ium_452639/training.jenkinsfile

45 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-05-13 01:10:40 +02:00
node {
checkout scm
2023-05-15 02:40:00 +02:00
stage('Init') {
properties([
pipelineTriggers([ upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: 's452639-create-dataset' ) ]),
parameters([
buildSelector(
defaultSelector: lastSuccessful(),
description: "Source of dataset",
name: 'BUILD_SELECTOR'
),
string(
defaultValue: "2",
description: "Epochs count",
name: "EPOCHS",
trim: true
),
])
])
}
2023-05-13 01:10:40 +02:00
def local_image = docker.build("s452639-image")
local_image.inside {
stage('Build') {
2023-05-15 02:57:03 +02:00
checkout([$class: 'GitSCM', branches: [[name: BRANCH_NAME]], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452639/ium_452639']]])
2023-05-13 01:10:40 +02:00
copyArtifacts fingerprintArtifacts: true,
projectName: 's452639-create-dataset',
2023-05-13 01:17:18 +02:00
selector: lastSuccessful(),
2023-05-13 01:10:40 +02:00
flatten: true,
target: 'src/'
2023-05-15 03:50:02 +02:00
sh 'cd src; python tf_train_sacred.py with epochs=$EPOCHS'
archiveArtifacts artifacts: 'src/model.keras,src/experiments/**/*', followSymlinks: false
2023-05-13 01:10:40 +02:00
}
}
2023-05-15 02:40:00 +02:00
stage('Trigger') {
build wait: false, job: 's452639-evaluation.eg'
}
2023-05-13 01:10:40 +02:00
}