Evaluated Groovy script should expose the current hudson.model.TaskListener so that scripts implementers can invoke hudson.model.Run#getEnvironment(hudson.model.TaskListener) (with the actual value) instead of invoking the deprecated hudson.model.Run#getEnvironment() which was deprecated since Jenkins 1.305 (EnvInject currently requires Jenkins ≥ 1.532.3):
/**
* @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)}
*/
public EnvVars getEnvironment() throws IOException, InterruptedException {
Code changed in jenkins
User: Fiouz
Path:
src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java
src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/help-groovyScriptContent.html
src/test/java/org/jenkinsci/plugins/envinject/EnvInjectEvaluatedGroovyScript.java
http://jenkins-ci.org/commit/envinject-plugin/434ab11da3e59ab102a186b4cae3a5916248f8c8
Log:
JENKINS-31829Add currentListener Groovy variable