-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Labels:None
-
Environment:SCM:
GitHub Enterprise
Jenkins:
Core 2.78
Blue Ocean 1.3.0-beta-3
Declarative Pipeline 1.2
Client:
Fedora Workstation 26
Google Chrome 61.0.3163.91
-
Sprint:Blue Ocean 1.3
-
Similar Issues:
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 Andrew Bayer. 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.
- links to
Here we're sitting on the original branch:
Now look for the line in the Jenkinsfile:
Make the edit in the editor, and save to the new branch. This is steps 3-4 in the steps to recreate. Now, do a git pull to pull down the branch you created with the editor. Mine was called new-parallel-name:
Do a git checkout new-parallel-name to check out the branch you created in the editor:
And finally, search this Jenkinsfile for the failFast: none line, and note that it's gone:
If you look closely at the two Jenkinsfiles, notice that there's a blank line where the failFast: false used to be.