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

Parallel pipeline not rendering properly

    Details

    • Similar Issues:

      Description

      I have a fairly simple pipeline:

      parallel 'branch1': {
              node('node1') {
                  stage('Setup') {
                      checkout([details removed])
                  }
                  stage('Unit and Integration Tests') {
                      bat '"my command to execute tests"'
                  }
              }
      }, 'branch2': {
              node('node2') {
                  stage('Setup') {
                      checkout([details removed])
                  }
                  stage('Unit and Integration Tests') {
                      bat '"my command to execute tests"'
                  }
              }
      }
      

      It doesn't seem to render the branches properly and the first stage uses the first branch's name.

      Please see attachments. The blackouts are the branch names. I also removed the emailext step from the pipeline .

        Attachments

        1. Pipeline1.png
          Pipeline1.png
          16 kB
        2. Pipeline2.png
          Pipeline2.png
          11 kB
        3. Pipeline3.png
          Pipeline3.png
          16 kB
        4. snap.png
          snap.png
          77 kB

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment - - edited

            Thanks for reporting this problem. It is a duplicate of JENKINS-39464.

            The easiest way to avoid this misrendering is to wrap your parallels in a single stage like so:

            stage('Build and Test') {
              parallel 'branch1': {
                      node('node1') {
                          stage('Setup') {
                              checkout([details removed])
                          }
                          stage('Unit and Integration Tests') {
                              bat '"my command to execute tests"'
                          }
                      }
              }, 'branch2': {
                      node('node2') {
                          stage('Setup') {
                              checkout([details removed])
                          }
                          stage('Unit and Integration Tests') {
                              bat '"my command to execute tests"'
                          }
                      }
              }
            }
            

            That will make your Pipeline look like:

            Show
            jamesdumay James Dumay added a comment - - edited Thanks for reporting this problem. It is a duplicate of JENKINS-39464 . The easiest way to avoid this misrendering is to wrap your parallels in a single stage like so: stage( 'Build and Test' ) { parallel 'branch1' : { node( 'node1' ) { stage( 'Setup' ) { checkout([details removed]) } stage( 'Unit and Integration Tests' ) { bat ' "my command to execute tests" ' } } }, 'branch2' : { node( 'node2' ) { stage( 'Setup' ) { checkout([details removed]) } stage( 'Unit and Integration Tests' ) { bat ' "my command to execute tests" ' } } } } That will make your Pipeline look like:
            Hide
            chinghwayu Ching-Hwa Yu added a comment -

            Oh, I see... thanks for the quick response! I've followed JENKINS-39464 and hopefully that'll get tackled soonish

            Show
            chinghwayu Ching-Hwa Yu added a comment - Oh, I see... thanks for the quick response! I've followed JENKINS-39464 and hopefully that'll get tackled soonish

              People

              • Assignee:
                Unassigned
                Reporter:
                chinghwayu Ching-Hwa Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: