@Override public void buildEnvVars(EnvVars env, TaskListener listener) throws IOException, InterruptedException { env.putAll(envVars); }
public EnvVars(@Nonnull Map<String,String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Jenkins passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
@Override public Channel launchChannel(String[] cmd, OutputStream out, FilePath workDir, Map<String, String> envVars) throws IOException, InterruptedException { EnvVars e = new EnvVars(env); e.putAll(envVars); return outer.launchChannel(cmd,out,workDir,e); }
private synchronized EnvVars getEnvironmentVariables2() throws WindowsOSProcessException { if(env !=null) { return env; } env = new EnvVars(); try { env.putAll(p.getEnvironmentVariables()); } catch (WinpException e) { throw new WindowsOSProcessException("Failed to get the environment variables", e); } return env; }
env.putAll(getCharacteristicEnvVars());
@Override public void buildEnvironmentFor(Run r, EnvVars env, TaskListener listener) throws IOException, InterruptedException { Computer c = Computer.currentComputer(); if (c!=null){ EnvVars compEnv = c.getEnvironment().overrideAll(env); env.putAll(compEnv); } env.put("BUILD_DISPLAY_NAME",r.getDisplayName()); Jenkins j = Jenkins.getInstance(); String rootUrl = j.getRootUrl(); if(rootUrl!=null) { env.put("BUILD_URL", rootUrl+r.getUrl()); } }
public EnvVars(Map<String,String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Hudson passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
public EnvVars(Map<String,String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Hudson passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
public EnvVars(Map<String, String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Hudson passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
public EnvVars(Map<String,String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Hudson passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
@Override public void buildEnvVars(EnvVars env, TaskListener listener) throws IOException, InterruptedException { env.putAll(envVars); }
public void buildEnvVars(AbstractBuild<?, ?> build, EnvVars env) { env.putAll(iterativeEnvVars); } public String getUrlName() {
public EnvVars(@Nonnull Map<String,String> m) { this(); putAll(m); // because of the backward compatibility, some parts of Jenkins passes // EnvVars as Map<String,String> so downcasting is safer. if (m instanceof EnvVars) { EnvVars lhs = (EnvVars) m; this.platform = lhs.platform; } }
@Override public EnvVars getEnvironment(final TaskListener log) throws IOException, InterruptedException { final EnvVars envVars = getJenkinsEnvVariables(log); envVars.putAll(getDotCiEnvVars(envVars)); return envVars; }
@Override public Channel launchChannel(String[] cmd, OutputStream out, FilePath workDir, Map<String, String> envVars) throws IOException, InterruptedException { EnvVars e = new EnvVars(env); e.putAll(envVars); return outer.launchChannel(cmd,out,workDir,e); }
private synchronized EnvVars getEnvironmentVariables2() throws WindowsOSProcessException { if(env !=null) { return env; } env = new EnvVars(); try { env.putAll(p.getEnvironmentVariables()); } catch (WinpException e) { throw new WindowsOSProcessException("Failed to get the environment variables", e); } return env; }
private static EnvVars getEnvVars(Run<?, ?> build, TaskListener listener) { EnvVars buildVariables; if (build instanceof AbstractBuild) { buildVariables = new EnvVars(); buildVariables.putAll(((AbstractBuild) build).getBuildVariables()); } else { buildVariables = Utils.extractBuildParameters(build, listener); } return buildVariables; }
@Override protected Lease decideWorkspace(final Node n, final WorkspaceList wsl) throws InterruptedException, IOException { final Lease baseLease = getParentWorkspaceLease(n, wsl); final FilePath baseDir = baseLease.path; final EnvVars env = getEnvironment(this.listener); env.putAll(getBuildVariables()); final String childWs = getParent().getName(); return Lease.createLinkedDummyLease(baseDir.child(env.expand(childWs)), baseLease); }
public static void setEnvironmentVariables(JenkinsRule j, Map<String, String> params) throws IOException { EnvironmentVariablesNodeProperty prop = new EnvironmentVariablesNodeProperty(); EnvVars envVars = prop.getEnvVars(); envVars.putAll(params); j.jenkins.getGlobalNodeProperties().add(prop); }