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

No support for failFast with new-style parallel

XMLWordPrintable

    • Blue Ocean 1.3

      Summary:
      I have a Jenkinsfile has a stage which includes a pair of parallel branches (note that this is the "old way" of doing parallel in Declarative). This stage also includes the failFast: false setting.
      After making a trivial edit to this Jenkinsfile in the editor, and saving it to a new branch, the failFast: false line gets deleted from the Jenkinsfile.

      Steps to recreate:
      1. Create a new branch in an existing repo, and use a Jenkinsfile which includes both parallel branches (the "old way"), and parallel stages (the "new way"). Both are still supported according to abayer. The stage with the parallel branches in it should also include the failFast: false setting.

      Sample:

              stage('Parallel Steps As Before') {
                  steps {
                      parallel firstBranch: {
                          node('master') {
                              build 'ten-parallels'
                          }
                      },
                      secondBranch: {
                          node('master') {
                              build 'ten-parallels'
                          }
                      },
                      failFast: false
                  }
              }
      

      2. Build this pipeline successfully.

      3. Load this pipeline into the editor, and make a trivial change. In my particular case, I changed the name of the "new style" parallel block with a trivial name change.

      4. Save this Pipeline to a new branch. It will build successfully:

      5. Now do a git pull to load your Jenkinsfile into a text editor. Notice that in the new branch, the failFast: false setting has been removed from the Jenkinsfile entirely.

      I'll attach before and after Jenkinsfiles shortly, along with some git command that show me verifying the presence of failFast: false in the first branch, and its removal in the second.

            abayer Andrew Bayer
            kshultz Karl Shultz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: