In Jenkins / Hudson, using the Postbuild Groovy script, I would like to get one of the following:
- environment variable (e.g. current JOB_NAME, BUILD_NUMBER, etc.).
- the result of a specific build number of the current project
- build number of the last failed build in the current project
At the moment, I have found only the following method, but it is rather limited:
def item = hudson.model.Hudson.instance.getItem("GroovyMultipleFailTest") def build = item.getLastBuild() build.getNumber()
datka
source share