/** Performs an installation. */ private int install(ToolInstallation t, BuildIDs id, AbstractProject p) throws IOException, InterruptedException { Run b = p.getBuildByNumber(Integer.parseInt(id.number)); if (b == null) throw new AbortException("No such build: " + id.number); Executor exec = b.getExecutor(); if (exec == null) throw new AbortException(b.getFullDisplayName() + " is not building"); Node node = exec.getOwner().getNode(); if (node == null) { throw new AbortException( "The node " + exec.getOwner().getDisplayName() + " has been deleted"); } t = t.translate(node, EnvVars.getRemote(checkChannel()), new StreamTaskListener(stderr)); stdout.println(t.getHome()); return 0; }
/** * Gets the environment variables of the JVM on this computer. If this is the master, it returns * the system property of the master computer. */ public EnvVars getEnvironment() throws IOException, InterruptedException { return EnvVars.getRemote(getChannel()); }