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

Hide specific steps in build view

    Details

    • Sprint:
      Blue Ocean 1.1-beta4, Blue Ocean 1.1
    • Similar Issues:

      Description

      We have a company-wide Pipeline setup that uses global pipeline scripts. These scripts do all sort of "behind the scenes" things to make the lives of developers as easy as possible, and make going from first commit to a testable application on Jenkins cost the least amount of code/configuration.

      This is all working great, and developers don't really interact with Jenkins in any way, unless their build failed, and they want to know why.

      Right now, when they click the red cross on GitHub, they are redirected to the build status on the "blue" view, but then they are greeted with multiple steps, that have no meaning to them, and are (given our global scripts work as expected) not the cause of their problems, they just want to see the output of their test run, not all the surrounding steps that make it possible to run their build/test.

      So basically, what I'm looking for is two things:

      1. make step titles more descriptive (but this is already being tackled in another issue)
      2. add the option to hide specific steps from showing up, so devs only see what's relevant

      I did find this issue: https://issues.jenkins-ci.org/browse/JENKINS-26987

      But this is not about the blueocean plugin, and I do believe that the notion "Running Steps is itself intended to be a debugging view" does not apply here, as the blueocean view very much is intended to be as simple as possible for developers to get to the root of their problems, and not for the "Jenkins people" amongst us, who want to drill down into all the possible details there are (for which we still have the classic interface).

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Jean Mertz as a general rule we do not want to hide steps for that exact reason. There are design problems in the original Pipeline script syntax that allowed a developer to write Pipelines that can't be visualised such as the orphaned step issue above and nesting stages/parallels.

            If we hide your global library steps from the visualization then we run into the same problem (all steps are green but the Pipeline shows failed) and that is a bigger usability issue than the one we are trying to solve here (hiding steps).

            We won't be providing a way to hide the steps. However, we can consider grouping steps into a single step so at least there are a smaller amount of steps visualized.

            Show
            jamesdumay James Dumay added a comment - Jean Mertz as a general rule we do not want to hide steps for that exact reason. There are design problems in the original Pipeline script syntax that allowed a developer to write Pipelines that can't be visualised such as the orphaned step issue above and nesting stages/parallels. If we hide your global library steps from the visualization then we run into the same problem (all steps are green but the Pipeline shows failed) and that is a bigger usability issue than the one we are trying to solve here (hiding steps). We won't be providing a way to hide the steps. However, we can consider grouping steps into a single step so at least there are a smaller amount of steps visualized.
            Hide
            vchijwani Vicky Chijwani added a comment - - edited

            This is a huge problem for us too. We have 100s of developers relying on a global shared library that abstracts out a lot of common functionality, exactly as described in the original issue description. It would be great to see the group proposal above implemented - it would definitely solve most of the problem.

            Show
            vchijwani Vicky Chijwani added a comment - - edited This is a huge problem for us too. We have 100s of developers relying on a global shared library that abstracts out a lot of common functionality, exactly as described in the original issue description. It would be great to see the  group proposal above implemented - it would definitely solve most of the problem.
            Hide
            anton_yurchenko Anton Yurchenko added a comment -

            I have an example of situations when hiding stages are required.

            Multi-branch pipeline, when push on different branch should create a different slave node in different network segment.

            In order to filter specific use case we are using WHEN condition.

            In such case, there are lots of 'pseudo' stages like "Branch: dev/master", "Branch: dev", "Env: development", "Env: production", "Branch: master".

            Such drill down also breaks the console output as two stages running in UI (for example: Branch: dev and Spawn Slave)

            stage("Branch: dev/master"){
              parallel {
                stage("Env: development") {
                  when {
                    allOf {
                      branch 'dev'
                      environment name: 'CHANGE_TARGET', value: ''
                    }
                  }
                  stages {
                    stage("Branch: dev"){
                      agent {label "development-slave"}
                      stages {
                        stage("Spawn Slave") {
                          steps {
                            sh 'command'
                          }
                          post {
                            failure {
                              sh 'command'
                            }
                            aborted {
                              sh 'command'
                            }
                          }
                        }
                        stage("Base Image") {
                          steps {
                            sh 'command'
                          }
                          post {
                            aborted {
                              sh 'command'
                            }
                            failure {
                              sh 'command'
                            }
                          }
                        }
                        stage("Dev Image") {
                          steps {
                            sh 'command'
                          }
                          post {
                            aborted {
                              sh 'command'
                            }
                            failure {
                              sh 'command'
                            }
                          }
                        }
                        stage("Notify Team"){
                          agent {label "master"}
                          steps {
                            sh 'command'
                          }
                        }
                        stage('Deploy QA') {
                          steps {
                            sh 'command'
                          }
                          post {
                            success {
                              sh 'command'
                            }
                            failure {
                              sh 'command'
                            }
                            aborted {
                              sh 'command'
                            }
                            always {
                              sh 'command'
                            }
                          }
                        }
                      }
                    }
                  }
                }
                stage("Env: production") {
                  when {
                    allOf {
                      branch 'master'
                      environment name: 'CHANGE_TARGET', value: ''
                    }
                  }
                  stages {
                    stage("Branch: master"){
                      agent {label "production-slave"}
                      stages {
                        stage("Spawn Slave") {
                          steps {
                            sh 'command'
                          }
                          post {
                            failure {
                              sh 'command'
                            }
                            aborted {
                              sh 'command'
                            }
                          }
                        }
                        stage("Base Image") {
                          steps {
                            sh 'command'
                          }
                          post {
                            aborted {
                              sh 'command'
                            }
                            failure {
                              sh 'command'
                            }
                          }
                        }
                        stage("Prod Image") {
                          steps {
                            sh 'command'
                          }
                          post {
                            success {
                              sh ' command'
                            }
                            failure {
                              sh 'command'
                            }
                            aborted {
                              sh 'command'
                            }
                            always {
                              sh 'command'
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            
            Show
            anton_yurchenko Anton Yurchenko added a comment - I have an example of situations when hiding stages are required. Multi-branch pipeline, when push on different branch should create a different slave node in different network segment. In order to filter specific use case we are using WHEN condition. In such case, there are lots of 'pseudo' stages like "Branch: dev/master", "Branch: dev", "Env: development", "Env: production", "Branch: master". Such drill down also breaks the console output as two stages running in UI (for example: Branch: dev and Spawn Slave) stage( "Branch: dev/master" ){ parallel { stage( "Env: development" ) { when { allOf { branch 'dev' environment name: 'CHANGE_TARGET' , value: '' } } stages { stage( "Branch: dev" ){ agent {label "development-slave" } stages { stage( "Spawn Slave" ) { steps { sh 'command' } post { failure { sh 'command' } aborted { sh 'command' } } } stage( "Base Image" ) { steps { sh 'command' } post { aborted { sh 'command' } failure { sh 'command' } } } stage( "Dev Image" ) { steps { sh 'command' } post { aborted { sh 'command' } failure { sh 'command' } } } stage( "Notify Team" ){ agent {label "master" } steps { sh 'command' } } stage( 'Deploy QA' ) { steps { sh 'command' } post { success { sh 'command' } failure { sh 'command' } aborted { sh 'command' } always { sh 'command' } } } } } } } stage( "Env: production" ) { when { allOf { branch 'master' environment name: 'CHANGE_TARGET' , value: '' } } stages { stage( "Branch: master" ){ agent {label "production-slave" } stages { stage( "Spawn Slave" ) { steps { sh 'command' } post { failure { sh 'command' } aborted { sh 'command' } } } stage( "Base Image" ) { steps { sh 'command' } post { aborted { sh 'command' } failure { sh 'command' } } } stage( "Prod Image" ) { steps { sh 'command' } post { success { sh ' command' } failure { sh 'command' } aborted { sh 'command' } always { sh 'command' } } } } } } } } }
            Hide
            brunomiguel_teixeira bruno teixeira added a comment - - edited

            I also have a specific use case in my company. We use jenkins & global shared libraries extensively to setup the build's workspaces.

            There are several steps (like creating folders, setting packages feeds, injecting env variables...) that i would like to "hide" from the users so that the commands that the users actually run are not mixed with shared libraries. This is because the steps in the shared libraries are not the end user's concern and often it becomes a bundled mess from the user's perspective.

             

            This is not a hard requirement, merely a UX improvement that i would like.

            Show
            brunomiguel_teixeira bruno teixeira added a comment - - edited I also have a specific use case in my company. We use jenkins & global shared libraries extensively to setup the build's workspaces. There are several steps (like creating folders, setting packages feeds, injecting env variables...) that i would like to "hide" from the users so that the commands that the users actually run are not mixed with shared libraries. This is because the steps in the shared libraries are not the end user's concern and often it becomes a bundled mess from the user's perspective.   This is not a hard requirement, merely a UX improvement that i would like.
            Hide
            gmarquez GMarquez added a comment -

            I think the ability to hide stages is useful. There are several small trivial stages in my pipeline and would like the ability to hide if possible. It would be nice to not see in OceanBlue but perhaps could still log in standard console output (in case any issues). 

            Topic: Add ability to hide skipped stages/ignore stages altogether (support DRY) , similar but not same, I like Timur Batyrshin's suggestion:
            https://issues.jenkins-ci.org/browse/JENKINS-48980?focusedCommentId=345319&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345319

            hide true 
            // hide false // default

            Show
            gmarquez GMarquez added a comment - I think the ability to hide stages is useful. There are several small trivial stages in my pipeline and would like the ability to hide if possible. It would be nice to not see in OceanBlue but perhaps could still log in standard console output (in case any issues).  Topic: Add ability to hide skipped stages/ignore stages altogether (support DRY) , similar but not same, I like Timur Batyrshin's suggestion: https://issues.jenkins-ci.org/browse/JENKINS-48980?focusedCommentId=345319&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-345319 hide true  // hide false // default

              People

              • Assignee:
                jamesdumay James Dumay
                Reporter:
                jeanmertz Jean Mertz
              • Votes:
                15 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated: