• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • Windows

      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 .

        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

          [JENKINS-40458] Parallel pipeline not rendering properly

          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:

          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:

          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

          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

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

              Created:
              Updated:
              Resolved: