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

Logs from wrapper steps are not shown in the step list

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None
    • Blue Ocean 1.0.1
      Jenkins 2.46.3
    • Blue Ocean - Candidates

      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".

          [JENKINS-44614] Logs from wrapper steps are not shown in the step list

          Cyrille Le Clerc created issue -
          Cyrille Le Clerc made changes -
          Description Original: 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).

           
          h2. Sample

          Credentials not found in "withCredentials()"

          h3. Jenkinsfile

          {code:java}
          node {
              checkout scm
              stage('Build') {
                  withCredentials([
                        usernamePassword(
                              credentialsId: 'credentials_dont_exist',
                              passwordVariable: 'MY_PASSWORD',
                              usernameVariable: 'MY_USERNAME')]) {

                      sh "./mvnw clean install"
                  }
              }
          }
          {code}

          h3. 'classic' build logs

          {noformat}
          [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
          {noformat}
           
          h3. 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".

           !image-2017-06-01-13-03-56-185.png|thumbnail!
          New: 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).

          h2. How to reproduce

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

          h2. Sample

          Credentials not found in "withCredentials()"

          h3. Jenkinsfile

          {code:java}
          node {
              checkout scm
              stage('Build') {
                  withCredentials([
                        usernamePassword(
                              credentialsId: 'credentials_dont_exist',
                              passwordVariable: 'MY_PASSWORD',
                              usernameVariable: 'MY_USERNAME')]) {

                      sh "./mvnw clean install"
                  }
              }
          }
          {code}

          h3. 'classic' build logs

          {noformat}
          [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
          {noformat}
           
          h3. 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".

           !image-2017-06-01-13-03-56-185.png|thumbnail!
          James Dumay made changes -
          Summary Original: [BO Run View] Display logs and err messages of wrapping steps... New: Logs from wrapper steps are not shown in the step list
          James Dumay made changes -
          Assignee Original: James Dumay [ jamesdumay ]
          James Dumay made changes -
          Assignee New: Vivek Pandey [ vivek ]
          James Dumay made changes -
          Sprint New: Blue Ocean 1.2 [ 326 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Epic Link New: JENKINS-43953 [ 181485 ]
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.2 [ 326 ] New: Blue Ocean 1.3 [ 296 ]
          James Dumay made changes -
          Rank New: Ranked lower

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

              Created:
              Updated: