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
Is there not a reliable way to get from the rawBuild if a build was aborted?
I cannot image that there's no way - as the builds are eventually - when they are totally finished - always displayed with the right result. 'Only' currentBuild.currentResult is very often giving a different result (FAILURE usually)
We're using this hack now to get better detection of aborted builds: