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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -