Skip to content

Commit 05c42b1

Browse files
Notification for all unsuccseful builds and back to normal
1 parent 4b873fa commit 05c42b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Jenkinsfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,11 @@ pipeline {
619619

620620
}
621621
post {
622-
failure {
623-
slackSend (channel: '@matthew.wilson', message: "Build failed ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
622+
unsuccessful {
623+
slackSend (channel: '@matthew.wilson', message: "${env.JOB_NAME} ${env.BUILD_NUMBER} - ${currentBuild.result} (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
624+
}
625+
fixed {
626+
slackSend (channel: '@matthew.wilson', message: "${env.JOB_NAME} ${env.BUILD_NUMBER} - Back to normal (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'slack-cics-node-dev')
624627
}
625628
}
626629
}

0 commit comments

Comments
 (0)