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

unsuccessful block is triggered for successful runs

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      pipeline-model-definition 1.3.5

      Description

      The post-unsuccessful block of my declarative pipeline is triggered even if the build is successful!

      Excerpt from my Jenkinsfile

      pipeline {
        stages { ... }
        post { 
          always { ... }
          success { ... }
          unsuccessful {
            script {
              echo "Build results: ${currentBuild.result} - ${currentBuild.currentResult}"
              ...
            }
          }
        }
      }
         

      And I can see `Build results: SUCCESS - SUCCESS` in the pipeline output - and the other steps of the unsuccessful block executed as well, of course

        

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dnusbaum Devin Nusbaum
              Reporter:
              kutzi kutzi
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: