2021-05-16 16:05:03 +02:00
|
|
|
pipeline {
|
|
|
|
agent any;
|
2021-05-16 16:53:00 +02:00
|
|
|
parameters{
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '10',
|
|
|
|
description: 'batch size',
|
|
|
|
name: 'BATCH_SIZE'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '5',
|
|
|
|
description: 'epochs',
|
|
|
|
name: 'EPOCHS'
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-05-16 16:07:21 +02:00
|
|
|
stages{
|
2021-05-16 16:53:00 +02:00
|
|
|
stage('artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434784-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-16 16:05:03 +02:00
|
|
|
stage('docker-training') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def image = docker.build('dock')
|
|
|
|
image.inside{
|
2021-05-16 16:11:21 +02:00
|
|
|
sh 'chmod +x training.py'
|
2021-05-16 16:53:00 +02:00
|
|
|
sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}'
|
|
|
|
|
2021-05-16 16:05:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-16 16:07:21 +02:00
|
|
|
}
|
|
|
|
}
|