mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
added Build parameter to buildEnvVars so that we can do build-specific things.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3476 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
35cc93f188
commit
f5ff3fdeb7
5 files changed
+11
-7
No files matched your search
@@ -226,7 +226,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
|
||||
JDK jdk = project.getJDK();
|
||||
if(jdk !=null)
|
||||
jdk.buildEnvVars(env);
|
||||
project.getScm().buildEnvVars(env);
|
||||
project.getScm().buildEnvVars(this,env);
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,9 @@ import hudson.EnvVars;
|
||||
import hudson.FilePath;
|
||||
import hudson.Launcher;
|
||||
import hudson.Proc;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.util.ArgumentListBuilder;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
@@ -56,7 +53,7 @@ abstract class AbstractCVSFamilySCM extends SCM {
|
||||
Map<String,String> env = new HashMap<String,String>();
|
||||
if(!overrideOnly)
|
||||
env.putAll(EnvVars.masterEnvVars);
|
||||
buildEnvVars(env);
|
||||
buildEnvVars(null/*TODO*/,env);
|
||||
return env;
|
||||
}
|
||||
}
|
||||
@@ -725,7 +725,7 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable {
|
||||
return DescriptorImpl.DESCRIPTOR;
|
||||
}
|
||||
|
||||
public void buildEnvVars(Map<String,String> env) {
|
||||
public void buildEnvVars(AbstractBuild build, Map<String, String> env) {
|
||||
if(cvsRsh!=null)
|
||||
env.put("CVS_RSH",cvsRsh);
|
||||
String cvspass = getDescriptor().getCvspassFile();
|
||||
|
||||
@@ -139,7 +139,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
|
||||
* This can be used to propagate information from SCM to builds
|
||||
* (for example, SVN revision number.)
|
||||
*/
|
||||
public void buildEnvVars(Map<String,String> env) {
|
||||
public void buildEnvVars(AbstractBuild build, Map<String, String> env) {
|
||||
// default implementation is noop.
|
||||
}
|
||||
|
||||
|
||||
@@ -163,10 +163,17 @@ public class SubversionSCM extends SCM implements Serializable {
|
||||
return username;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubversionRepositoryBrowser getBrowser() {
|
||||
return browser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildEnvVars(AbstractBuild build, Map<String, String> env) {
|
||||
super.buildEnvVars(build, env);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after checkout/update has finished to compute the changelog.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user