I have setup a declarative Jenkinsfile for my project.  I have some post 
conditions defined for success and failure.  I would like to be able to 
determine the job status for the previous build within the 'success' block 
so that  I can know if this success is a recovery from a previous failure. 
 I do understand that the currentBuild.result variable can be set at 
various stages and that the previous build result is available through 
currentBuild.getPreviousBuild()?.getResult().  But this previous build 
result seems to require the setting of currentBuild.result.

At this point, I am more interested in accessing the actual Jenkins job 
status, i.e. whatever it uses to determine whether a job has been a success 
or failure and not rely on currentBuild.result.  Is there some other 
variable available for this?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/38b5f9d7-2168-4f93-be78-ff13556c3820%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to