When running pipeline job with parallel stages, the order of stages returned by the endpoint '/job/<jobname>/wfapi/runs' is inconsistent with the way the stages are created and displayed when completed. The ui is designed to display runs from the newest to the oldest with stages provided in the same order. Therefore when parallel stages are used, the ui will almost always only display the last run.
Attached screenshots will show :
- Before running the job (Consistent Before Run.png), the order of stages of the completed runs allow to display all previous runs.
- When running the job (Inconsistent During Run.png), the different order of stages of the running job discontinue the display of the previous runs.
- After running the job (Consistent After Run.png), the order of stages of the newly completed run follows its natural creation order and allow the ui to display the previous runs.
The previous exemple was made with the script (parallelPipelineScriptTest.txt) attached and was tested on :
- A Jenkins server version : 2.235.1 with the Pipeline plugin version 2.6 (containing plugin Pipeline: Stage View Plugin version 2.13)
- A local development post with pipeline-stage-view-plugin, branch : master, current version : 2.14-SNAPSHOT. Some changes in pom.xml files had to be maid to create the pipeline, 'node' being not recognized in the goovy script with the vanilla dependencies provided by the poms, see changes in patchPoms.txt.