diff --git a/Jenkinsfile b/Jenkinsfile index 5c09adf37..8c1d56994 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -128,15 +128,20 @@ pipeline{ } post { regression { - when { branch 'master' } - slackSend (color: '#ff0000', message: '"master" branch build is now failing') + script { + if (env.BRANCH_NAME == 'master') { + slackSend (color: '#ff0000', message: '"master" branch build is now failing') + } + } } fixed { - when { branch 'master' } - slackSend (color: '#00ff00', message: '"master" branch build is now fixed') + script { + if (env.BRANCH_NAME == 'master') { + slackSend (color: '#00ff00', message: '"master" branch build is now fixed') + } + } } } - } def cancelPreviousBuilds() {