ium_452639/training.jenkinsfile

45 lines
1.0 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') {
checkout([$class: 'GitSCM', branches: [[name: 'ztm']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452639/ium_452639']]])
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 02:40:00 +02:00
sh 'cd src; python tf_train.py $EPOCHS'
2023-05-13 01:10:40 +02:00
archiveArtifacts artifacts: 'src/model.keras', followSymlinks: false
}
}
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
}