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

Go to the "first" error for a pipeline execution

    XMLWordPrintable

    Details

    • Sprint:
      tethys, pannonian
    • Similar Issues:

      Description

      In a scenario with multiple failed stages, the last stage log is shown... but this is probably irrelevant, the first failed stage would have most likely caused a condition that the later stage failed by. Noticed this on ci: https://ci.blueocean.io/blue/organizations/jenkins/Pipeline%20Editor/detail/PR-15/1/pipeline/

        Attachments

          Activity

          Hide
          tscherler Thorsten Scherler added a comment -

          Keith Zantow I am trying to reproduce that but I am not able.

          I am using following script

          pipeline {
            agent any
            stages {
              stage('build') {
                steps {
                  sh 'echo "mvn clean install" > target/editor.hpi' 
                }
              }
            }
            post {
              success {
                archive 'target/editor.hpi'
              }
              always {
                junit 'target/**/*.xml'
              }
            }
          }
          

          ...and the result is what I would expect

          Show
          tscherler Thorsten Scherler added a comment - Keith Zantow I am trying to reproduce that but I am not able. I am using following script pipeline { agent any stages { stage( 'build' ) { steps { sh 'echo "mvn clean install" > target/editor.hpi' } } } post { success { archive 'target/editor.hpi' } always { junit 'target /**/ *.xml' } } } ...and the result is what I would expect
          Show
          kzantow Keith Zantow added a comment - Thorsten Scherler add a failure in the post build. https://ci.blueocean.io/blue/organizations/jenkins/Pipeline%20Editor/detail/master/17/pipeline
          Hide
          tscherler Thorsten Scherler added a comment -

          Keith Zantow if you see my script it has a fail in the post.

           always {
                junit 'target/**/*.xml'
              }
          

          will always fail in the current script.

          The error message you are seeing for the post stage is the same I see, but seems the key could be how the stage fails.

          Your link fails with system 1 and my example with system 2. Will try that now.

          Show
          tscherler Thorsten Scherler added a comment - Keith Zantow if you see my script it has a fail in the post. always { junit 'target /**/ *.xml' } will always fail in the current script. The error message you are seeing for the post stage is the same I see, but seems the key could be how the stage fails. Your link fails with system 1 and my example with system 2. Will try that now.

            People

            • Assignee:
              tscherler Thorsten Scherler
              Reporter:
              kzantow Keith Zantow
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: