-
Bug
-
Resolution: Not A Defect
-
Minor
My(stripped out) Jenkinsfile looks like this:
pipeline {
options {
gitlabBuilds(builds: ['prepare-build-environment', 'build'])
}
stages {
//stages for preparing the build environment and building
stage('Deploy'){
when {
anyOf {
branch 'dev'
branch 'release'
branch 'master'
}
}
options {
gitlabBuilds(builds: ['deploy'])
}
steps {
//my steps
}
post {
failure {
updateGitlabCommitStatus name: 'deploy', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'deploy', state: 'success'
}
}
}
//more stuff
}
}
Since I'm using Multibranch Pipeline, I don't want 'Deploy' stage to happen on feature branches. But GitLab gets notified about 'deploy' stage in all cases, and even if the Jenkins job finishes successfully, pipeline status on GitLab is still "running":
This makes "Merge when pipeline succeeds" useless, since it will never succeed.