2021-05-14 04:01:11 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile true
|
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build training', name: 'BUILD_SELECTOR_TRAINING'),
|
2021-05-14 12:35:24 +02:00
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH',
|
2021-05-14 04:01:11 +02:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("Copy artifacts"){
|
|
|
|
steps {
|
2021-05-14 12:35:24 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434704-training/${params.BRANCH}', selector: buildParameter('BUILD_SELECTOR')
|
2021-05-14 14:36:35 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434704-evaluation/${params.BRANCH}', selector: buildParameter(lastSuccessful(), optional: true)
|
2021-05-14 04:01:11 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434704-create-dataset', selector: buildParameter(lastSuccessful())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run evaluation"){
|
|
|
|
steps {
|
|
|
|
sh "python3 evaluation.py"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive single metrics') {
|
|
|
|
steps{
|
2021-05-14 04:30:31 +02:00
|
|
|
archiveArtifacts 'rmse.txt'
|
2021-05-14 04:01:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Save metrics to bulk file & create chart') {
|
|
|
|
steps{
|
2021-05-14 04:16:17 +02:00
|
|
|
sh "if [ -f "rmse.txt" ]; "${env.BUILD_ID} ${cat rmse.txt}" >> bulk_metrics.txt fi"
|
2021-05-14 04:01:11 +02:00
|
|
|
archiveArtifacts 'bulk_metrics.txt'
|
|
|
|
sh "python3 create_chart.py"
|
|
|
|
archiveArtifacts 'chart.png'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
mail body: "EVALUATION - ${currentBuild.currentResult}", subject: 's434704', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|