2022-05-03 14:40:26 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2022-05-07 21:14:51 +02:00
|
|
|
dockerfile true
|
2022-05-03 14:40:26 +02:00
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
string (
|
|
|
|
defaultValue: '100',
|
|
|
|
description: 'Epochs',
|
|
|
|
name: 'EPOCHS'
|
|
|
|
)
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's444380-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Checkout git") {
|
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Train model") {
|
|
|
|
steps {
|
2022-05-03 15:03:42 +02:00
|
|
|
sh "chmod u+x ./train_model.py"
|
2022-05-07 21:00:13 +02:00
|
|
|
sh "python3 ./train_model.py with 'epochs=$EPOCHS'"
|
2022-05-07 19:44:54 +02:00
|
|
|
archiveArtifacts artifacts: "model/*, out.csv, experiments/*/*", onlyIfSuccessful: true
|
2022-05-03 14:40:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
2022-05-03 14:52:47 +02:00
|
|
|
emailext body: "SUCCESS", subject: "s444380-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
|
2022-05-03 20:02:22 +02:00
|
|
|
build job: "s444380-evaluation/master"
|
2022-05-03 14:40:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
2022-05-03 14:52:47 +02:00
|
|
|
emailext body: "FAILURE", subject: "s444380-training", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
|
2022-05-03 14:40:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|