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

Custom title for build steps

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      Is it possible to add custom title for steps in Jenkinsfile. Theses titles would improve readability in build steps logs and blue ocean plugins.

      I was thinkings of something like this :

      node {
          stage('aStage'){
              checkout scm
      
              @Step(title='List files')
              sh 'ls -l'
      
              @Step(title='Do something')
              aStep 'do something'
          }
      }
      

      See images for visualisations

      Add titles to steps make it easy to understand what is done in each step in a team.

       

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Yanis LISIMA we are going to automatically generate more meaningful descriptions for the steps in the Blue Ocean UI as part of JENKINS-37324. I think this might solve the problem you are having. If not, please reopen this ticket.

            Show
            jamesdumay James Dumay added a comment - Yanis LISIMA we are going to automatically generate more meaningful descriptions for the steps in the Blue Ocean UI as part of JENKINS-37324 . I think this might solve the problem you are having. If not, please reopen this ticket.
            Hide
            zeenlym Yanis LISIMA added a comment - - edited

            The solution for JENKINS-37324-- is to show description based on parameter.

            But i would like to let developer give a human readable description of what they're doing in steps if needed

            Also i was thinking about using annotation in order to give this behaviour to all steps without necessary development.

            If it is complicated issue --JENKINS-37324 is enough for now.

            Show
            zeenlym Yanis LISIMA added a comment - - edited The solution for JENKINS-37324 -- is to show description based on parameter. But i would like to let developer give a human readable description of what they're doing in steps if needed Also i was thinking about using annotation in order to give this behaviour to all steps without necessary development. If it is complicated issue -- JENKINS-37324 is enough for now.
            Hide
            jamesdumay James Dumay added a comment -

            Yanis LISIMA I'd prefer to see if JENKINS-37324 resolves most peoples problems before we allow this level of customisability for individual steps. I can see how this could be useful but I think the demands on the syntax make it somewhat of a advanced feature.

            I will re-evaluate this when we've had JENKINS-37324 out in a release for a few months.

            Show
            jamesdumay James Dumay added a comment - Yanis LISIMA I'd prefer to see if JENKINS-37324 resolves most peoples problems before we allow this level of customisability for individual steps. I can see how this could be useful but I think the demands on the syntax make it somewhat of a advanced feature. I will re-evaluate this when we've had JENKINS-37324 out in a release for a few months.
            Hide
            zeenlym Yanis LISIMA added a comment -

            I am ok with that.

            See you

            Show
            zeenlym Yanis LISIMA added a comment - I am ok with that. See you
            Hide
            ssbarnea Sorin Sbarnea added a comment -

            Time to reopen it? Having it as closed prevents people from voting it.

            I find that really useful but I suggest a different implementation that does not add so much verbosity to pipeline scripts. Just add a "title" or "name" parameter to the the "step" class and that's all.

            Show
            ssbarnea Sorin Sbarnea added a comment - Time to reopen it? Having it as closed prevents people from voting it. I find that really useful but I suggest a different implementation that does not add so much verbosity to pipeline scripts. Just add a "title" or "name" parameter to the the "step" class and that's all.
            Hide
            jamesdumay James Dumay added a comment - - edited

            Sorin Sbarnea there is a way for individual steps to display their own description via the plugin API. I would suggest raising a ticket against the plugins which provide steps where the names don't fit your needs instead of reopening this one.

            Show
            jamesdumay James Dumay added a comment - - edited Sorin Sbarnea there is a way for individual steps to display their own description via the plugin API. I would suggest raising a ticket against the plugins which provide steps where the names don't fit your needs instead of reopening this one.
            Hide
            lucasocio Leandro Lucarella added a comment -

            That's not enough. Plug-in writers won't be able to know users needs.

            For example, I have a case where I use the `checkout` step to get code from more than one repo, I would like to be able to describe what each checkout is about.

            How could the plug-in writer know how this is best represented. Should they use the URL? The branch? Maybe some directory if the sparse checkout plug-in is used?

            It makes no sense to put this on the side of the plug-in writer. The user knows best. Also effort wise, for me is trivial to add some `@Step(title='Checkout main component')` while implementing all sort of heuristics to try to guess what the user wants for a plug-in writer would be madness.

            Please reopen. This Issue makes a lot of sense.

            Show
            lucasocio Leandro Lucarella added a comment - That's not enough. Plug-in writers won't be able to know users needs. For example, I have a case where I use the `checkout` step to get code from more than one repo, I would like to be able to describe what each checkout is about. How could the plug-in writer know how this is best represented. Should they use the URL? The branch? Maybe some directory if the sparse checkout plug-in is used? It makes no sense to put this on the side of the plug-in writer. The user knows best. Also effort wise, for me is trivial to add some `@Step(title='Checkout main component')` while implementing all sort of heuristics to try to guess what the user wants for a plug-in writer would be madness. Please reopen. This Issue makes a lot of sense.

              People

              • Assignee:
                Unassigned
                Reporter:
                zeenlym Yanis LISIMA
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: