Add notification on failure
pipeline {
agent any
+ environment {
+ TARGET_ADMIN_EMAILS = 'james@overton.ca'
+ }
stages {
stage('Build') {
@@ -32,5 +35,9 @@ pipeline {
always {
archiveArtifacts artifacts: 'bin/*.jar', fingerprint: true
}
+ failure {
+ echo "There has been a failure in the ${env.BRANCH_NAME} pipeline."
+ mail bcc: '', body: "There has been a pipeline failure in ${env.BRANCH_NAME}. Please see: https://build.obolibrary.io/job/ontodev/job/robot/${env.BRANCH_NAME}", cc: '', from: '', replyTo: '', subject: "ROBOT Integration Test FAIL", to: "${TARGET_ADMIN_EMAILS}"
+ }
}
}
