• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None

      The scenario works fine for the scripted pipeline but the same fails in the declarative pipeline

      scripted pipeline

      {{def j=[:]
      node \{
          [
              [name: "api", folder: "api"],
              [name: "ui", folder: "ui"]
          ].each { m -> 
              j[m.name] = {
                  stage('a') {
                      echo "A"
                  }
                  stage('b') \{
                      echo "B"
                  }
              }
          }
          parallel j
      }}}
      

       

      declarative pipeline

       

      {{pipeline \{
          agent any;
          stages {
              stage("parallel") {
                  steps {
                      script {
                          def j=[:]
                          [
                              [name: "api", folder: "api"],
                              [name: "ui", folder: "ui"]
                          ].each { m -> 
                              j[m.name] = {
                                  stage('a') {
                                      echo "A"
                                  }
                                  stage('b') \{
                                      echo "B"
                                  }
                              }
                          }
                          parallel j
                      }
                  }
              }
          }
      }}}

      All the stages run but are not displayed.

      See related Stackoverflow question.

      Seems related to JENKINS-49050

          [JENKINS-64822] Parallel stages not displayed correctly

          James added a comment -

          Any idea when this can be resolved? Also having this issue and this is a major pain for my team.

          James added a comment - Any idea when this can be resolved? Also having this issue and this is a major pain for my team.

          Ulrich Berger added a comment -

          Is there a known workaround for this issue?

          Ulrich Berger added a comment - Is there a known workaround for this issue?

          dizzy added a comment -

          Can you tell me if this is why i dont see my downstream jobs?  My case is..

          I have 6 stages. Stage 3 calls the same job with different parameters and wait=false.  

          i dont see that branch off in the view - instead they are shown as two separate builds (although the second does show 'upstream pipline <job> build#' in the message display column

          dizzy added a comment - Can you tell me if this is why i dont see my downstream jobs?  My case is.. I have 6 stages. Stage 3 calls the same job with different parameters and wait=false.   i dont see that branch off in the view - instead they are shown as two separate builds (although the second does show 'upstream pipline <job> build#' in the message display column

          My pipeline has dynamic stages within stages:

          stage1
          stage2
          stage3
              stage3a
                  stage3a1a (parallel with stage3a1b if needed)
                  stage3a1b (parallel with stage3a1a if needed)
                  stage3a2 (starts when both stage3a1a and stage3a1b end successfully)
              stage3b
                  stage3b1a (parallel with stage3b1b if needed)
                  stage3b1b (parallel with stage3b1a if needed)
                  stage3b2 (starts when both stage3b1a and stage3b1b end successfully)

          The stage3a, stage3b, etc. are dynamic too

           

          The logic runs correctly, but the Blue Ocean display is not showing all stages or showing the different trees of stages.  Funny thing is, while the pipeline is running, it shows a little better (still not correct), but the end result is below.

          Anthony Veckey added a comment - My pipeline has dynamic stages within stages: stage1 stage2 stage3 stage3a stage3a1a (parallel with stage3a1b if needed) stage3a1b (parallel with stage3a1a if needed) stage3a2 (starts when both stage3a1a and stage3a1b end successfully) stage3b stage3b1a (parallel with stage3b1b if needed) stage3b1b (parallel with stage3b1a if needed) stage3b2 (starts when both stage3b1a and stage3b1b end successfully) The stage3a, stage3b, etc. are dynamic too   The logic runs correctly, but the Blue Ocean display is not showing all stages or showing the different trees of stages.  Funny thing is, while the pipeline is running, it shows a little better (still not correct), but the end result is below.

            Unassigned Unassigned
            javydreamercsw javydreamercsw
            Votes:
            9 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: