2023-06-26 19:38:13 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
name: 'BUILD_SELECTOR',
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'A build to take the artifacts from'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
name: 'EPOCHS',
|
|
|
|
description: 'Number of epochs',
|
|
|
|
defaultValue: '10'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
copyArtifacts(
|
|
|
|
projectName: 'x1-create-dataset',
|
|
|
|
selector: buildParameter('BUILD_SELECTOR'),
|
|
|
|
target: './'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Run training and save model') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'ls -l'
|
|
|
|
docker.image('docker-image').inside {
|
|
|
|
sh 'ls -l'
|
2023-06-26 20:13:21 +02:00
|
|
|
sh 'python3 ./train.py'
|
2023-06-26 19:38:13 +02:00
|
|
|
archiveArtifacts 'model.pt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// post {
|
|
|
|
// success {
|
|
|
|
// build job: 'x1-evaluation.eg/main', wait: false
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|