[JIRA] (JENKINS-43339) `currentBuild.result` is not set to `ABORTED` when the build was aborted

1 view
Skip to first unread message

kutzi@gmx.de (JIRA)

unread,
Jul 20, 2018, 11:54:02 AM7/20/18
to jenkinsc...@googlegroups.com
kutzi commented on Bug JENKINS-43339
 
Re: `currentBuild.result` is not set to `ABORTED` when the build was aborted

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:

{{ if (currentBuild.rawBuild.getActions(jenkins.model.InterruptedBuildAction.class).isEmpty())

{ return currentBuild.currentResult }

else

{ return "ABORTED" }

}}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

kutzi@gmx.de (JIRA)

unread,
Jul 20, 2018, 11:54:03 AM7/20/18
to jenkinsc...@googlegroups.com
kutzi edited a comment on Bug JENKINS-43339
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:

{ { quote}        if (currentBuild.rawBuild.getActions(jenkins.model.InterruptedBuildAction.class).isEmpty()) {

            return currentBuild.currentResult
        } else {
            return "ABORTED"
        } {quote } }

kutzi@gmx.de (JIRA)

unread,
Jul 20, 2018, 11:57:07 AM7/20/18
to jenkinsc...@googlegroups.com
kutzi edited a comment on Bug JENKINS-43339
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:

{ quote code }
if (currentBuild.rawBuild.getActions(jenkins.model.InterruptedBuildAction.class).isEmpty()) {
            return currentBuild.currentResult
        } else {
            return "ABORTED"
        }

{ quote code }

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:18 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

Bulk closing resolved issues.

Jenkins / Bug JENKINS-43339
Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages