mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
build: Fix Jenkinsfile syntax
Turns out that "when" blocks are permitted but not effectual in "post" sections so instead use a script behaviour to make the message conditional on build change. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
b5d64be479
commit
44cf97e2fd
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user