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

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

          [JENKINS-35836] Steps outside a stage or within a stage but outside a parallel do not get visualized

          James Dumay created issue -
          Michael Neale made changes -
          Epic Link New: UX-19 [ 24579 ]
          Michael Neale made changes -
          Rank New: Ranked higher
          Michael Neale made changes -
          Sprint New: 1.0-m7 [ 61 ]

          Josh McDonald added a comment -

          This becomes easier if we can make some assumptions such as "stages will only be top-level 'constructs', and pipeline will blow up if you put a stage inside parallel or node"

          Josh McDonald added a comment - This becomes easier if we can make some assumptions such as "stages will only be top-level 'constructs', and pipeline will blow up if you put a stage inside parallel or node"

          Michael Neale added a comment -

          we can make some assumptions about where stage goes, yes.

          Michael Neale added a comment - we can make some assumptions about where stage goes, yes.
          James Dumay made changes -
          Rank New: Ranked lower
          James Dumay made changes -
          Assignee New: James Dumay [ jdumay ]

          James Dumay added a comment -

          mneale based on our discussion sounds like we should add another node for these before the parallel if steps like this exist.

          Is that good enough?

          James Dumay added a comment - mneale based on our discussion sounds like we should add another node for these before the parallel if steps like this exist. Is that good enough?
          James Dumay made changes -
          Status Original: To Do [ 10003 ] New: In Review [ 10005 ]

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

              Created:
              Updated:
              Resolved: