-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
Jenkins 1.609.1,
Claim plugin: 2.7
Global post script plugin: 1.0.10
I want to get claim reason in the script
job = hudson.model.Hudson.instance.getItem("demo2") build = job.getLastBuild() println build def action = build.getAction(hudson.plugins.claim.ClaimBuildAction.class) print action.getReason()
The script works well under jenkins script console (/script), while when it is executed as global post script, it reports
Failed to execute: claim.groovy, No such property: hudson for class: Script1
in build.getAction(), it seems I can't pass the class name inside.