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

Go to the "first" error for a pipeline execution

    XMLWordPrintable

Details

    • tethys, pannonian

    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

          kzantow 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

          tscherler Thorsten Scherler added a comment - kzantow 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
          kzantow Keith Zantow added a comment - tscherler add a failure in the post build. https://ci.blueocean.io/blue/organizations/jenkins/Pipeline%20Editor/detail/master/17/pipeline

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

          tscherler Thorsten Scherler added a comment - kzantow 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

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

            Dates

              Created:
              Updated:
              Resolved: