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