-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
Worker Operating Systems: Debian Stretch
Jenkins ver 2.138
Pipeline ver 2.5
Blue Ocean 1.8.3
This happens only if that stage fails before the other stages. If the failing stage happens last then the stages which have already completed as passing do not have their regression post conditions triggered.
Otherwise, the currentBuild.currentResult of the other stages, which should be passing, become FAILURE despite all of the steps being green.
// Sample Jenkinsfile to test this #!groovy pipeline { agent { node { label "" customWorkspace "workspace/test_regression" } } options { buildDiscarder(logRotator(numToKeepStr: '50')) compressBuildLog() timestamps() } stages { stage('Parallel'){ parallel { stage("Passing Stage 1") { options { timeout(time: 120, unit: 'MINUTES') } steps { sh "ls" } post { regression { echo "This stage has a regression" echo "Current Result: ${currentBuild.currentResult}" echo "Previous Build Result: ${currentBuild.previousBuild.result}" } } } stage("Failing Stage 1") { options { timeout(time: 120, unit: 'MINUTES') } steps { sh "ls nothing" } post { regression { echo "This stage has a regression" echo "Current Result: ${currentBuild.currentResult}" echo "Previous Build Result: ${currentBuild.previousBuild.result}" } } } stage("Passing Stage 2") { options { timeout(time: 120, unit: 'MINUTES') } steps { echo "Passing Stage" } post { regression { echo "This stage has a regression" echo "Current Result: ${currentBuild.currentResult}" echo "Previous Build Result: ${currentBuild.previousBuild.result}" } } } } } } }