2021-05-13 22:20:25 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2021-05-13 23:40:39 +02:00
|
|
|
dockerfile true
|
|
|
|
}
|
2021-05-13 22:20:25 +02:00
|
|
|
parameters {
|
2021-05-14 04:01:11 +02:00
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
|
2021-05-13 23:40:39 +02:00
|
|
|
string(name: 'options', description: 'Trainig script options')
|
2021-05-13 22:20:25 +02:00
|
|
|
buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("Copy artifacts"){
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434704-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run training"){
|
2021-05-13 22:43:26 +02:00
|
|
|
steps {
|
|
|
|
sh "python3 training.py ${params.options}"
|
|
|
|
}
|
2021-05-13 22:20:25 +02:00
|
|
|
}
|
|
|
|
stage('Save trained model files') {
|
|
|
|
steps{
|
2021-05-14 04:30:31 +02:00
|
|
|
archiveArtifacts 'linear_regression.h5'
|
2021-05-13 22:20:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2021-05-14 04:01:11 +02:00
|
|
|
mail body: "TRAINING - ${currentBuild.currentResult}", subject: 's434704', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
success {
|
2021-05-14 04:55:58 +02:00
|
|
|
build job: 's434704-evaluation', parameters: [
|
2021-05-14 12:49:09 +02:00
|
|
|
gitParameter(name: 'BRANCH', value: params.BRANCH)
|
2021-05-14 04:01:11 +02:00
|
|
|
], wait: false
|
2021-05-13 22:20:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|