-
Bug
-
Resolution: Incomplete
-
Blocker
-
None
-
Jenkins 2.303.1
This may be a duplicate of JENKINS-57801, but in case it's subtly different and not, I will open a new issue here.
Given this pipeline:
pipeline { agent { label 'lightweight' } stages { stage('Build') { parallel { stage('SUCCESSful stage, SUCCESSful build') { steps { sh script: 'sleep 5; exit 0' } post { success { echo "post -> success" sh script: 'exit 0' } unsuccessful { echo "post -> unsuccessful" } } } stage('Set\'s UNSTABLE stage, SUCCESSful build in post -> success') { steps { sh script: 'exit 0' } post { success { echo "post -> success" catchError(stageResult: 'UNSTABLE', buildResult: 'UNSTABLE') { error('build->success error() call') } } unsuccessful { echo "post -> unsuccessful" } } } stage('SUCCESSful stage, SUCCESSful build after 10s') { steps { sh script: 'sleep 10; exit 0' } post { success { echo "post -> success" sh script: 'exit 0' } unsuccessful { echo "post -> unsuccessful" } } } } } } }
I would expect the two SUCCESSful stage, SUCCESSful build stages to execute their post -> success blocks. However they do not. They both execute their post -> unsuccessful blocks: