I'm trying to use the groovy-postbuild-plugin in my Jenkins pipeline, I can get it to work for displaying plain text, But I can't use it with parameters.
So this is working:
stage('postbuild disply service built') {
currentBuild.rawBuild.getActions().add(GroovyPostbuildAction.createShortText("test"));
}
But this one doesn't:
stage('postbuild disply service built') {
manager.addShortText("${manager.build.buildVariables.get('REPO_NAME')}");
}
This is the error I get:
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified field org.jenkinsci.plugins.workflow.job.WorkflowRun buildVariables

