-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
-
pipeline-model-definition 1.3.5
If a user has a Declarative Pipeline script with parallel stages, and they set 'failFast true' for those stages, if one of the stages fails then the build is immediately aborted. The result of the build is set to ABORTED. It would be better if there was a way to optionally have the build result be FAILURE in this case (in a scripted pipeline the result will be FAILURE). Although it makes a kind of logical sense for it to be ABORTED, because we have told Jenkins to abort the build, we did so because a stage failed. If we didn't failFast, the build's result would always be FAILURE.
Here is an example Declarative Pipeline that demonstrates the problem:
pipeline { agent any stages { stage('Parallel Stage') { failFast true parallel { stage('Branch A') { steps { sh 'false' } } stage('Branch B') { steps { sleep 10 echo "On Branch B" } } } } } }
- relates to
-
JENKINS-56402 Declarative Pipeline shows SUCCESS even though job FAILED
- Reopened
-
JENKINS-56544 failFast option for parallel stages sets build status to ABORTED when failure is inside of a stage with an agent
- Closed
- links to