ium_430705/Jenkinsfile_evaluation
s430705 75761b2db3
Some checks failed
s430705-evaluation/pipeline/head There was a failure building this commit
s430705-training/pipeline/head There was a failure building this commit
Add plot for evaluation, add parameters to jenkins and fix mail sending
2021-05-13 11:19:15 +02:00

62 lines
2.2 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD_DATA'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD_TRAIN'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD_EVAL'
)
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages {
stage('copyArtifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-create-dataset', selector: buildParameter('WHICH_BUILD_DATA')
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-training/master', selector: buildParameter('WHICH_BUILD_TRAIN')
copyArtifacts optional: true, fingerprintArtifacts: true, projectName: 's430705-evaluation/master', selector: buildParameter('WHICH_BUILD_EVAL')
}
}
stage('Evaluation') {
steps{
sh 'python3 "./lab06-eval.py ${env.BUILD_ID}"'
sh 'python3 "./lab06-plot.py"'
sh 'python3 "./lab07_sacred01.py"'
sh 'python3 "./lab07_sacred02.py"'
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'eval.txt'
archiveArtifacts 'lab07/**'
archiveArtifacts 'evaluation_plot.png'
}
}
}
post {
success {
mail body: 'SUCCESS', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
mail body: 'UNSTABLE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
mail body: 'FAILURE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
mail body: 'CHANGED', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}