[JIRA] (JENKINS-44094) Hide specific steps in build view

7 views
Skip to first unread message

vchijwani@tower-research.com (JIRA)

unread,
Aug 3, 2018, 11:03:03 PM8/3/18
to jenkinsc...@googlegroups.com
Vicky Chijwani commented on New Feature JENKINS-44094
 
Re: Hide specific steps in build view

This is a huge problem for us too. The group proposal above would be great - it would definitely solve most of the problem.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

vchijwani@tower-research.com (JIRA)

unread,
Aug 3, 2018, 11:05:02 PM8/3/18
to jenkinsc...@googlegroups.com
Vicky Chijwani edited a comment on New Feature JENKINS-44094
This is a huge problem for us too. The 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 would be great implemented - it would definitely solve most of the problem.

anton.doar@gmail.com (JIRA)

unread,
Nov 26, 2018, 2:18:02 AM11/26/18
to jenkinsc...@googlegroups.com

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'
                }
              }
            }
          }
        }
      }
    }
  }
}
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

brunomiguel.teixeira@farfetch.com (JIRA)

unread,
Nov 26, 2018, 6:37:03 AM11/26/18
to jenkinsc...@googlegroups.com

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.

brunomiguel.teixeira@farfetch.com (JIRA)

unread,
Nov 26, 2018, 6:38:02 AM11/26/18
to jenkinsc...@googlegroups.com
bruno teixeira edited a comment on New Feature JENKINS-44094
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.

gibran.marquez@intel.com (JIRA)

unread,
Mar 26, 2019, 4:36:03 PM3/26/19
to jenkinsc...@googlegroups.com
GMarquez commented on New Feature JENKINS-44094

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

jenkins@nerdswords.de (JIRA)

unread,
Feb 5, 2020, 4:00:10 AM2/5/20
to jenkinsc...@googlegroups.com
Thomas Peitz updated an issue
 
Jenkins / New Feature JENKINS-44094
Change By: Thomas Peitz
Attachment: Bildschirmfoto 2020-02-05 um 09.58.26.png
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jenkins@nerdswords.de (JIRA)

unread,
Feb 5, 2020, 4:05:03 AM2/5/20
to jenkinsc...@googlegroups.com
Thomas Peitz commented on New Feature JENKINS-44094
 
Re: Hide specific steps in build view

We are using a shared jenkins library for our company which allows our developers to set up pipelines pretty easily.

In the configuration of the pipelines we allow to enable / disable steps. Here is an example of a Jenkinsfile:

 

@Library('i...@0.1.0') _

 

buildPipelineKubernetes

Unknown macro: {   helmVersion = 'x.xx.x'   productionDeployment = false   lintOpenApi = false }

 

It works pretty good for us and removed the need that developer need to know how Jenkins works. It boosted developer happiness enormously.

 

Now our deployment pipelines have a lot of steps which are just "white" as they are not executed for the project. For this particular project steps won't be ever executed. So it bloats the view and gives devs bad user experience.

 

So for us it would be nice to be able to hide steps if they are not executed. Is there any chance we can implement this feature ourselves? - We would take time and try to create a pull request if there is a solution which would be accepted.

 

We would favor the contribution rather of going back to scripted pipelines again.

 

Greetings, Thomas 

jenkins@nerdswords.de (JIRA)

unread,
Feb 5, 2020, 4:06:06 AM2/5/20
to jenkinsc...@googlegroups.com
Thomas Peitz edited a comment on New Feature JENKINS-44094
We are using a shared jenkins library for our company which allows our developers to set up pipelines pretty easily.

In the configuration of the pipelines we allow to enable / disable steps. Here is an example of a Jenkinsfile:

 
{quote}@Library('i...@0.1.0') _

 

buildPipelineKubernetes
  {


 
helmVersion = 'x.xx.x'


 
productionDeployment = false

 
lintOpenApi = false

}
{quote}

 

It works pretty good for us and removed the need that developer need to know how Jenkins works. It boosted developer happiness enormously.

 

Now our deployment pipelines have a lot of steps which are just "white" as they are not executed for the project. For this particular project steps won't be ever executed. So it bloats the view and gives devs bad user experience.

!Bildschirmfoto 2020-02-05 um 09.58.26.png!


 

So for us it would be nice to be able to hide steps if they are not executed. Is there any chance we can implement this feature ourselves? - We would take time and try to create a pull request if there is a solution which would be accepted.

 

We would favor the contribution rather of going back to scripted pipelines again.

 

Greetings, Thomas 

jenkins@nerdswords.de (JIRA)

unread,
Feb 5, 2020, 4:06:10 AM2/5/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages