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

View sequential stages in the pipeline visualization graph

    • Blue Ocean 1.8.0

      In progress - one level of visualization below parent stage. Additional research and feedback will help us determine future visualizations.

      I've tried using nested stages in order to group each shell script alone to have a meaningful data, however this broken the UI of blueocean and it stopped it from showing showing the variant steps.

      Example 1

      def test = [:]
      
      test["a"] = {
          stage ("a") {
              stage ("ab") {
                  sh "echo stage abc"
              }
              stage ("xyz") {
                  sh "echo stage xyz"
              }
          }
      }
      
      test["b"] = {
          stage ("b") {
              stage ("bb") {
                  sh "echo stage bb"
              }
              stage ("bxz") {
                  sh "echo stagebxyz"
              }
          }
      }
      node {
         //stage 'start'
         parallel test
         stage ('middle') {
             sh "echo middle"
         }
         
      }
      

      Example 2

      node() {
        stage('Build') {
          println 'I prepare the build for the parallel steps'
        }
      
        stage('Test') {
         parallel (
       "win7-vs2012" : { stage("checkout") { }; stage("build") { }; stage("test") { } },
       "win10-vs2015" : { stage("checkout") { }; stage("build") { }; stage("test") { }},
       "linux-gcc5" : { stage("checkout") { }; stage("build") { }; stage("test") { } }
      )
        }
      }
      

        1. After.png
          After.png
          6 kB
        2. alternate zoom in.png
          alternate zoom in.png
          85 kB
        3. Before.PNG
          Before.PNG
          8 kB
        4. blueocean.sketch 2016-09-28 15-03-57.png
          blueocean.sketch 2016-09-28 15-03-57.png
          29 kB
        5. blueocean-failure.JPG
          blueocean-failure.JPG
          60 kB
        6. Capture.JPG
          Capture.JPG
          17 kB
        7. current.png
          current.png
          23 kB
        8. example.png
          example.png
          44 kB
        9. image-2017-04-12-16-16-17-144.png
          image-2017-04-12-16-16-17-144.png
          148 kB
        10. image-2017-04-12-16-17-38-285.png
          image-2017-04-12-16-17-38-285.png
          131 kB
        11. image-2017-08-14-10-34-10-452.png
          image-2017-08-14-10-34-10-452.png
          10 kB
        12. image-2017-10-19-08-24-00-504.png
          image-2017-10-19-08-24-00-504.png
          3 kB
        13. Jenkins-substages.png
          Jenkins-substages.png
          9 kB
        14. jenkins-weird-masked2.png
          jenkins-weird-masked2.png
          52 kB
        15. pipeline_mockup.png
          pipeline_mockup.png
          11 kB
        16. PipelineGraphProposal.png
          PipelineGraphProposal.png
          62 kB
        17. Proposed Parallel Stages.JPG
          Proposed Parallel Stages.JPG
          21 kB
        18. screenshot-1.png
          screenshot-1.png
          4 kB
        19. Screen Shot 2016-10-03 at 4.13.46 PM.png
          Screen Shot 2016-10-03 at 4.13.46 PM.png
          25 kB

          [JENKINS-38442] View sequential stages in the pipeline visualization graph

          dnusbaum So for nested stages in scripted pipelines, do we need to open another feature request - or is there already something in place?

          Joerg Schwaerzler added a comment - dnusbaum So for nested stages in scripted pipelines, do we need to open another feature request - or is there already something in place?

          Devin Nusbaum added a comment -

          macdrega I don't think there are any open feature requests specific to nested stages in scripted pipelines. We could reopen this issue and modify the title to be a little more specific, or we could open a new issue (probably better to have a more focused issue, assuming some of the people here are satisfied with the nested stage support for declarative in blue ocean 1.8), but I think either would be fine.

          Devin Nusbaum added a comment - macdrega I don't think there are any open feature requests specific to nested stages in scripted pipelines. We could reopen this issue and modify the title to be a little more specific, or we could open a new issue (probably better to have a more focused issue, assuming some of the people here are satisfied with the nested stage support for declarative in blue ocean 1.8), but I think either would be fine.

          Daniel Kurzynski added a comment - - edited

          I think originally, this ticketed was also about having parallel blocks within parallel blocks. So at least two level of parallelization. 
          Although the declarative syntax does not support it, you can have scripted parallel blocks within a parallel block in a declarative pipeline. The result is not visualized properly.

           

           

          Daniel Kurzynski added a comment - - edited I think originally, this ticketed was also about having parallel blocks within parallel blocks. So at least two level of parallelization.  Although the declarative syntax does not support it, you can have scripted parallel blocks within a parallel block in a declarative pipeline. The result is not visualized properly.    

          Devin Nusbaum added a comment -

          kurzy Yes, this issue has multiple feature requests in the comments, so it seems to me like it would make more sense to open individual issues so each request can be discussed separately, but we could also just reopen this issue.

          Devin Nusbaum added a comment - kurzy Yes, this issue has multiple feature requests in the comments, so it seems to me like it would make more sense to open individual issues so each request can be discussed separately, but we could also just reopen this issue.

          dnusbaum: Hmm, looking at the examples above think this issue was originally targeted to scripted Pipeline. However as I like the idea of having smaller feature requests which are easier to implement on its own. Therefore I will create a new feature request hoping it'll not be merged with similar feature requests.

          Joerg Schwaerzler added a comment - dnusbaum : Hmm, looking at the examples above think this issue was originally targeted to scripted Pipeline. However as I like the idea of having smaller feature requests which are easier to implement on its own. Therefore I will create a new feature request hoping it'll not be merged with similar feature requests.

          For those interested: I raised a new fr here: JENKINS-53162

          Joerg Schwaerzler added a comment - For those interested: I raised a new fr here: JENKINS-53162

          Phil Segal added a comment -

          sophistifunk is there still no plans to support nested parallels? we have built a nested parallel scripted pipeline, and the blue ocean view seems to change between various representations. More worryingly, if a task fails it shows as GREEN  . Something like pipeline_mockups.png from above would be amazing

           

          Phil Segal added a comment - sophistifunk is there still no plans to support nested parallels? we have built a nested parallel scripted pipeline, and the blue ocean view seems to change between various representations. More worryingly, if a task fails it shows as GREEN  . Something like pipeline_mockups.png from above  would be amazing  

          dnusbaum As suggested, I have created an issue for two level of parallelization: https://issues.jenkins-ci.org/browse/JENKINS-54010

          Daniel Kurzynski added a comment - dnusbaum As suggested, I have created an issue for two level of parallelization:  https://issues.jenkins-ci.org/browse/JENKINS-54010

          Ahmed Sghaier added a comment -

          Is there any luck for implementing the pipeline mockup proposed by Ben Dean? https://issues.jenkins-ci.org/browse/JENKINS-38442?focusedCommentId=292647&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-292647

          Should we create a separate issue for this?

          Ahmed Sghaier added a comment - Is there any luck for implementing the pipeline mockup proposed by Ben Dean? https://issues.jenkins-ci.org/browse/JENKINS-38442?focusedCommentId=292647&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-292647 Should we create a separate issue for this?

          Anentropic added a comment -

          This is a very long thread so forgive me if this is already covered...

          Can anyone explain why a stage that contains sub-stages is displayed as a preceding node instead of a container?

          Take this example:

          The stage "Test" performs no actions of its own, but it contains the sub-stages that follow.

          Wouldn't it make more sense to display it as a container, something like:

          Anentropic added a comment - This is a very long thread so forgive me if this is already covered... Can anyone explain why a stage that contains sub-stages is displayed as a preceding node instead of a container? Take this example: The stage "Test" performs no actions of its own, but it contains the sub-stages that follow. Wouldn't it make more sense to display it as a container, something like:

            cloudbees CloudBees Inc.
            mbadran mohamed badran
            Votes:
            206 Vote for this issue
            Watchers:
            233 Start watching this issue

              Created:
              Updated:
              Resolved: