How do you access current, and related, build information from within a Jenkins workflow groovy script?
I can see things like currentBuild.result and currentBuild.pr
currentBuild.rawBuild
will give you the non cached hudson.model.Run
object, see hudson.model.Run
from there, to access i.e. the build log:
def buildLog = currentBuild.rawBuild.log
currentBuild.rawBuild
is also of type hudson.model.AbstractBuild which can give you other details like changeset
, actions