Skip to content

Commit

Permalink
Post pipeline: send email if status changed
Browse files Browse the repository at this point in the history
  • Loading branch information
gquerret committed Jan 31, 2023
1 parent 199f37d commit 16208a8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,9 @@ pipeline {
}

post {
failure {
changed {
script {
mail body: "Check console output at ${BUILD_URL}/console", to: "[email protected]", subject: "PCT build failure in Jenkins - Branch ${BRANCH_NAME}"
}
}
fixed {
script {
mail body: "Console output at ${BUILD_URL}/console", to: "[email protected]", subject: "PCT build is back to normal - Branch ${BRANCH_NAME}"
mail body: "Check console output at ${BUILD_URL}/console", to: "[email protected]", subject: "PCT Build Status Changed - Branch ${BRANCH_NAME}"
}
}
}
Expand Down

0 comments on commit 16208a8

Please sign in to comment.