mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-03 20:15:45 +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 {
|
post {
|
||||||
regression {
|
regression {
|
||||||
when { branch 'master' }
|
script {
|
||||||
slackSend (color: '#ff0000', message: '"master" branch build is now failing')
|
if (env.BRANCH_NAME == 'master') {
|
||||||
|
slackSend (color: '#ff0000', message: '"master" branch build is now failing')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fixed {
|
fixed {
|
||||||
when { branch 'master' }
|
script {
|
||||||
slackSend (color: '#00ff00', message: '"master" branch build is now fixed')
|
if (env.BRANCH_NAME == 'master') {
|
||||||
|
slackSend (color: '#00ff00', message: '"master" branch build is now fixed')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def cancelPreviousBuilds() {
|
def cancelPreviousBuilds() {
|
||||||
|
Loading…
Reference in New Issue
Block a user