Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
pipeline-model-api plugin 1.3.4
Jenkins 2.150.1
-
-
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
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is related to |
Link |
This issue is duplicated by |
Assignee | Andrew Bayer [ abayer ] | Devin Nusbaum [ dnusbaum ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Remote Link | This issue links to "jenkinsci/pipeline-model-definition-plugin#313 (Web Link)" [ 22419 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Fixed but Unreleased [ 10203 ] |
Released As | pipeline-model-definition 1.3.5 | |
Status | Fixed but Unreleased [ 10203 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
I noticed this as well in https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313, (the main point of that PR is not related, I just happened to see it) and added a fix for it there. See https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313#discussion_r259517064 specifically.