Add email notifications

This commit is contained in:
Agata 2022-05-01 10:07:25 +02:00
parent ee114fb214
commit 44d83afd1a
2 changed files with 25 additions and 0 deletions

View File

@ -19,7 +19,22 @@ pipeline {
copyArtifacts filter: '*', projectName:'s444421-evaluation/training_and_evaluation', optional: true copyArtifacts filter: '*', projectName:'s444421-evaluation/training_and_evaluation', optional: true
sh 'ipython ./evaluation.py' sh 'ipython ./evaluation.py'
archiveArtifacts artifacts: 'build_accuracy.txt, bilds_accuracy.jpg' archiveArtifacts artifacts: 'build_accuracy.txt, bilds_accuracy.jpg'
sh 'ACC=$(tail -n 1 build_accuracy.txt)'
} }
} }
} }
post {
success {
emailext body: 'SUCCESS - ACCURACY: ${ACC}', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
aborted {
emailext body: 'ABORTED', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
} }

View File

@ -33,7 +33,17 @@ pipeline {
} }
post { post {
success { success {
emailext body: 'SUCCESS', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
build job: 's444421-evaluation/training_and_evaluation' build job: 's444421-evaluation/training_and_evaluation'
} }
failure {
emailext body: 'FAILURE', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
aborted {
emailext body: 'ABORTED', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
} }
} }