Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55459

failFast option for parallel stages should be able to set build result to FAILED


    • 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"

            dnusbaum Devin Nusbaum
            owenmehegan Owen Mehegan
            2 Vote for this issue
            7 Start watching this issue