Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
send slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
osher cohen committed Aug 25, 2020
1 parent 5cc366e commit 632e6fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ pipeline {
if (env.BRANCH_NAME == 'master')
stage('notify master branch fail') {
withCredentials([string(credentialsId: 'slack-token', variable: 'TOKEN')]) {
sh '''
echo '{"text":"Attention! assisted-ignition-generator branch test failed, see: ' > data.txt
echo ${BUILD_URL} >> data.txt
echo '"}' >> data.txt
curl -X POST -H 'Content-type: application/json' --data-binary "@data.txt" https://hooks.slack.com/services/$TOKEN
'''

}
}
}
Expand Down

0 comments on commit 632e6fc

Please sign in to comment.