-
Bug
-
Resolution: Unresolved
-
Major
-
None
If you have a main job that triggers a build and wait for the result, you should show the downstream job in the stage, but is not on every case if you use the parallel step, and it never shows if you use the parallel directive in a declarative pipeline
MainJob 1
pipeline { agent any stages { stage('Run Tests') { steps { parallel( 'Stage 1': {build job: 'downstreamJob', parameters: [string(name: 'VAR', value: '3')]}, 'Stage 2': {build job: 'downstreamJob', parameters: [string(name: 'VAR', value: '4')]} ) } } } }
MainJob 2
pipeline { agent any stages { stage('Run Tests') { parallel { stage('Stage 1') { steps { build job: 'downstreamJob', parameters: [string(name: 'VAR', value: '1')] } } stage('Stage 2') { steps { build job: 'downstreamJob', parameters: [string(name: 'VAR', value: '3')] } } } } } }
Downstream job
pipeline { agent any parameters { string(name: 'VAR', defaultValue: "1") } stages { stage('Downstream') { steps { echo "NOOP" } } } }
also if the parallel steps are equals, only links one of the stages with the downstream job even do two jobs were launched