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

Parallel downstream jobs are not linked correctly

    Details

    • Similar Issues:

      Description

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

        Attachments

        1. fail-har.json
          71 kB
        2. har-ok.json
          72 kB
        3. mainJob-fail.png
          mainJob-fail.png
          144 kB
        4. mainJob-fail-2.png
          mainJob-fail-2.png
          145 kB
        5. mainJob-fail-2-1.png
          mainJob-fail-2-1.png
          163 kB
        6. mainJob-fail-2-2.png
          mainJob-fail-2-2.png
          148 kB
        7. mainJob-fail-2-3.png
          mainJob-fail-2-3.png
          787 kB
        8. mainJob-stage-1-ok.png
          mainJob-stage-1-ok.png
          158 kB
        9. mainJob-stage-2-ok.png
          mainJob-stage-2-ok.png
          158 kB
        10. Screenshot 2019-07-25 at 12.00.40.png
          Screenshot 2019-07-25 at 12.00.40.png
          268 kB
        11. Screenshot 2019-07-25 at 12.01.14.png
          Screenshot 2019-07-25 at 12.01.14.png
          227 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ifernandezcalvo Ivan Fernandez Calvo
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: