Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Critical
-
Resolution: Fixed
-
Component/s: pipeline-model-definition-plugin
-
Labels:None
-
Environment:pipeline-model-api plugin 1.3.4
Jenkins 2.150.1
-
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
- is duplicated by
-
JENKINS-55265 Unsuccessful post stage fires even on Success status
-
- Closed
-
- is related to
-
JENKINS-49997 Pipeline Declarative post unsuccessful block
-
- Closed
-
- links to