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

Steps outside a stage or within a stage but outside a parallel do not get visualized

XMLWordPrintable

    • 1.0-japan-m9, 1.0-m7

      This feature request is unplanned and is not actively being worked on

      We are unable to merge orphaned steps (that is, steps that exist outside of a stage or outside of a parallel within a stage) into the closest stage or a synthetic without considerable engineering effort to ensure that all steps are available in the visualization.

      As a workaround we recommend that you wrap any steps within stage and do not include steps sitting outside a parallel in the same stage or try Declarative Pipeline which was designed not to have this problem.

      Scope
      For visualisation purposes:

      • Step outside stage is relocated to the previous stage or next stage (depending if at start, middle or end of the pipeline)
      • Step before a parallel block is relocated to the first parallel branch
      • Step after a parallel block is relocated to the last parallel branch

      Problem
      It is possible that a stage, that has parallel branches under it, also has steps before or after a parallel section.

      Example 1 - step outside stage block
      The output of the step that echos never going to let you down will never be visible from the UI.

      node {
        stage "Stage 1" {
          sh "echo never going to give you up"
        }
        sh "echo never going to let you down"
        stage "Stage 2" {
          parallel (
            "Firefox" : { echo "Never run around" },
            "Edge" : { echo "Never desert you" }
          ) 
        }
        
        stage "Stage 3" {
          echo "Make you cry (never)"
          echo "Tell a lie and hurt you (never)"
        }
      }
      
      

      Example 2 - step inside stage but not within parallel
      The output of the step that echos never going to let you down will never be visible from the UI.

      node {
        stage "Stage 1" {
          sh "echo never going to give you up"
        }
        
        stage "Stage 2" {
          sh "echo never going to let you down"
          parallel (
            "Firefox" : { echo "Never run around" },
            "Edge" : { echo "Never desert you" }
          ) 
        }
        
        stage "Stage 3" {
          echo "Make you cry (never)"
          echo "Tell a lie and hurt you (never)"
        }
      }
      

        1. Screenshot-2018-2-27 jenkins test-declarative #6.png
          85 kB
          Giorgio Sironi
        2. view-out-of-stage.png
          23 kB
          Julien Pivotto
        3. view-out-of-stage2.png
          22 kB
          Julien Pivotto

            Unassigned Unassigned
            jamesdumay James Dumay
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: