Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
None
Description
Right now when the build is aborted using the `pipeline-input-step` plugin in a declarative pipeline, the build result is set to `FAILURE` instead of `ABORTED` in the post section. However, the actual result is properly set to `ABORTED` afterwards. This makes it impossible to do conditional code in the post section.
Attachments
Issue Links
- is duplicated by
-
JENKINS-46572 Not expected behaviour for Post section of DSL pipeline in case of abort
-
- Closed
-
-
JENKINS-43895 Possibility to avoid postBuild notification on Aborted build
-
- Closed
-
- links to
It seems this is also true for `SUCCESS` which is set only after the build has completed (and after all post sections), but using `currentBuild.result` inside of a post section returns `null`.