Use script for telegram notification
Jenkins' declarative pipelines have interesting requirements around when you can use traditional groovy scripting in the pipeline and some items in `post` require special handling. Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
cc494ec04b
commit
dd6981c481
1 changed files with 14 additions and 4 deletions
18
schutzbot/Jenkinsfile
vendored
18
schutzbot/Jenkinsfile
vendored
|
|
@ -158,12 +158,22 @@ pipeline {
|
|||
|
||||
post {
|
||||
success {
|
||||
when { branch 'master' }
|
||||
telegramSend "💚 CI passed for osbuild-composer master branch!. ${env.BUILD_URL}"
|
||||
node('schutzbot') {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
telegramSend "💚 CI passed for osbuild master branch ${env.BUILD_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unsuccessful {
|
||||
when { branch 'master' }
|
||||
telegramSend "💣 CI failed for osbuild-composer master branch! ${env.BUILD_URL}"
|
||||
node('schutzbot') {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
telegramSend "💣 CI failed for osbuild master branch ${env.BUILD_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue