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

Logs from wrapper steps are not shown in the step list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Blue Ocean 1.0.1
      Jenkins 2.46.3
    • Similar Issues:
    • Sprint:
      Blue Ocean - Candidates

      Description

      Blue OCean doesn't display the log messages and error messages generated by plugin wrapping steps (and maybe other kinds of messages).

      This make it particularly difficult to understand build failures caused by the environment (e.g. credentials not found).

      How to reproduce

      Create a pipeline for https://github.com/cyrille-leclerc/a-broken-jenkinsfile/

      Sample

      Credentials not found in "withCredentials()"

      Jenkinsfile

      node {
          checkout scm
          stage('Build') {
              withCredentials([
                    usernamePassword(
                          credentialsId: 'credentials_dont_exist', 
                          passwordVariable: 'MY_PASSWORD', 
                          usernameVariable: 'MY_USERNAME')]) {
      
                  sh "./mvnw clean install"
              }
          }
      }
      

      'classic' build logs

      [Pipeline] stage
      [Pipeline] { (Build)
      [Pipeline] withCredentials
      [Pipeline] // withCredentials
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      
      GitHub has been notified of this commit’s build result
      
      org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: credentials_dont_exist
      	at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:153)
      	at org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding.bind(UsernamePasswordMultiBinding.java:76)
      	at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution.start(BindingStep.java:114)
      	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:222)
      	...
      Finished: FAILURE
      

       

      Blue Ocean Build View

      The Blue Ocean build view doesn't display any information to help to understand that the cause is a credentials not found in "withCredentials".

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            So, this is a bigger matter than it may look at first glance - JENKINS-45380, e.g., is the same thing, really. The core issue is that Blue Ocean doesn't represent block-scoped steps at all currently. I think changing Blue Ocean accordingly is probably going to be a fairly complex thing - the NodeGraphVisitor stuff will need to change to be aware of start/end nodes for steps other than just parallel and stage like it is currently, there'll need to be some design work determining how to visually represent block-scoped steps (show both the start and end, with other steps within indented maybe? I dunno, I am not a UI designer, to say the least!), etc...

            Show
            abayer Andrew Bayer added a comment - So, this is a bigger matter than it may look at first glance - JENKINS-45380 , e.g., is the same thing, really. The core issue is that Blue Ocean doesn't represent block-scoped steps at all currently. I think changing Blue Ocean accordingly is probably going to be a fairly complex thing - the NodeGraphVisitor stuff will need to change to be aware of start/end nodes for steps other than just parallel and stage like it is currently, there'll need to be some design work determining how to visually represent block-scoped steps (show both the start and end, with other steps within indented maybe? I dunno, I am not a UI designer, to say the least!), etc...
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Thanks for making this fix happen in Blue Ocean 1.4!

            Show
            cleclerc Cyrille Le Clerc added a comment - Thanks for making this fix happen in Blue Ocean 1.4!

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              cleclerc Cyrille Le Clerc
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: