How to create build variable using Groovy in Jenkins 2.x -
before update 2.7.x version of jenkins, used code create build variable in job using 'execute system groovy script':
import hudson.model.* build.addaction(new parametersaction(new stringparametervalue("var_name", 'foo')))
after update doesn't work, in log see:
warning hudson.model.run getenvvars deprecated call run.getenvvars @ sun.reflect.generatedmethodaccessor1108.invoke(unknown source)
is there workaround, or how create variable using groovy now?
Comments
Post a Comment