Skip to content
Permalink
Browse files

Fix JENKINS-14437 (Add a way to override build parameters)

  • Loading branch information...
gboissinot committed Dec 26, 2012
1 parent bf62a85 commit ed245ce8c7b4562159291a3599d6638e65301155
@@ -0,0 +1,22 @@
package org.jenkinsci.plugins.envinject;

import hudson.Extension;
import hudson.model.AbstractBuild;
import hudson.model.BuildVariableContributor;

import java.util.Map;

/**
* @author Gregory Boissinot
*/
@Extension
public class EnvInjectBuildVariableContributor extends BuildVariableContributor {

@Override
public void buildVariablesFor(AbstractBuild build, Map<String, String> variables) {
EnvInjectPluginAction envInjectAction = build.getAction(EnvInjectPluginAction.class);
if (envInjectAction != null) {
variables.putAll(envInjectAction.getEnvMap());
}
}
}

0 comments on commit ed245ce

Please sign in to comment.
You can’t perform that action at this time.