pipeline build.result in post action

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pipeline build.result in post action

David van Laatum
I have just got a bug issue https://issues.jenkins-ci.org/browse/JENKINS-47348 Is there a correct way to make the build status not be in progress when used from post actions? I see the token macro plugin does

// In the case of pipeline jobs, if the status hasn't been set to a non-null value, then it is considered "success"
if (!(run instanceof AbstractBuild) && null == run.getResult()) {
 
// TODO this makes little sense. Why not just use Building as below?
 
return Result.SUCCESS.toString();
}

I feel like there should be a isInPostActions() or similar method, and possibly where isBuilding returns false?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b8ba4851-db1e-407d-bbd4-d1753ec72b4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: pipeline build.result in post action

Jesse Glick-4
https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/master/CORE-STEPS.md#interacting-with-build-status

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3v0TySVxrvn5x2Xyjy-_HjA2-d1%3D430NmBU05%3DeUQAhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.