Parallel downstream jobs are not linked correctly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

        1. mainJob-stage-1-ok.png
          mainJob-stage-1-ok.png
          158 kB
        2. mainJob-stage-2-ok.png
          mainJob-stage-2-ok.png
          158 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. Screenshot 2019-07-25 at 12.00.40.png
          Screenshot 2019-07-25 at 12.00.40.png
          268 kB
        9. Screenshot 2019-07-25 at 12.01.14.png
          Screenshot 2019-07-25 at 12.01.14.png
          227 kB
        10. fail-har.json
          71 kB
        11. har-ok.json
          72 kB

            Assignee:
            Unassigned
            Reporter:
            Ivan Fernandez Calvo
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: