/** * Creates a {@link CommandLauncher} for launching a slave locally. * * @param env * Environment variables to add to the slave process. Can be null. */ public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException { int sz = hudson.getNodes().size(); return new CommandLauncher( String.format("\"%s/bin/java\" %s -jar \"%s\"", System.getProperty("java.home"), SLAVE_DEBUG_PORT>0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="+(SLAVE_DEBUG_PORT+sz): "", new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()), env); }
CommandLauncher commandLauncher = new CommandLauncher(sshClientLaunchString); commandLauncher.launch(computer, listener); } finally { identityKeyFile.delete();
Process _proc = null; try { listener.getLogger().println(hudson.model.Messages.Slave_Launching(getTimestamp())); if(getCommand().trim().length()==0) { listener.getLogger().println(Messages.CommandLauncher_NoLaunchCommand()); return; listener.getLogger().println("$ " + getCommand()); ProcessBuilder pb = new ProcessBuilder(Util.tokenize(getCommand())); final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
listener.getLogger().println(hudson.model.Messages.Slave_Launching(getTimestamp())); if(getCommand().trim().length()==0) { listener.getLogger().println(Messages.CommandLauncher_NoLaunchCommand()); return; listener.getLogger().println("$ " + getCommand()); ProcessBuilder pb = new ProcessBuilder(Util.tokenize(getCommand())); final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie); reportProcessTerminated(_proc, listener); try { ProcessTree.get().killAll(_proc, _cookie);
.add("--interactive", "--attach", remotingContainer.getId()); prependArgs(args); new CommandLauncher(args.toString(), dockerHost.getEnvironment()).launch(computer, listener); return remotingContainer;
Process _proc = null; try { listener.getLogger().println(hudson.model.Messages.Slave_Launching(getTimestamp())); if(getCommand().trim().length()==0) { listener.getLogger().println(Messages.CommandLauncher_NoLaunchCommand()); return; listener.getLogger().println("$ " + getCommand()); ProcessBuilder pb = new ProcessBuilder(Util.tokenize(getCommand())); final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
/** * Creates a {@link CommandLauncher} for launching a slave locally. * * @param env * Environment variables to add to the slave process. Can be null. */ public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException { int sz = hudson.getNodes().size(); return new CommandLauncher( String.format("\"%s/bin/java\" %s -jar \"%s\"", System.getProperty("java.home"), SLAVE_DEBUG_PORT>0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="+(SLAVE_DEBUG_PORT+sz): "", new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()), env); }
.add("--interactive", "--attach", remotingContainer.getId()); prependArgs(args); new CommandLauncher(args.toString(), dockerHost.getEnvironment()).launch(computer, listener); return remotingContainer;
Process _proc = null; try { listener.getLogger().println(hudson.model.Messages.Slave_Launching(getTimestamp())); if (getCommand().trim().length() == 0) { listener.getLogger().println(Messages.CommandLauncher_NoLaunchCommand()); return; listener.getLogger().println("$ " + getCommand()); ProcessBuilder pb = new ProcessBuilder(Util.tokenize(getCommand())); final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
/** * Creates a {@link CommandLauncher} for launching a slave locally. * * @param env Environment variables to add to the slave process. Can be * null. */ public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException { int sz = hudson.getNodes().size(); return new CommandLauncher( String.format("\"%s/bin/java\" %s -jar \"%s\"", System.getProperty("java.home"), SLAVE_DEBUG_PORT > 0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=" + (SLAVE_DEBUG_PORT + sz) : "", new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()), env); }
CommandLauncher commandLauncher = new CommandLauncher(sshClientLaunchString, null); commandLauncher.launch(computer, listener); } finally { identityKeyFile.delete();
Process _proc = null; try { listener.getLogger().println(hudson.model.Messages.Slave_Launching(getTimestamp())); if(getCommand().trim().length()==0) { listener.getLogger().println(Messages.CommandLauncher_NoLaunchCommand()); return; listener.getLogger().println("$ " + getCommand()); ProcessBuilder pb = new ProcessBuilder(Util.tokenize(getCommand())); final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
@Override public CommandLauncher launch(String host, TaskListener listener) throws IOException, InterruptedException { return new CommandLauncher(command, new EnvVars("SLAVE", host)); }
@Override public CommandLauncher launch(String host, TaskListener listener) throws IOException, InterruptedException { return new CommandLauncher(command,new EnvVars("SLAVE",host)); }
@Override public CommandLauncher launch(String host, TaskListener listener) throws IOException, InterruptedException { return new CommandLauncher(command,new EnvVars("SLAVE",host)); }
@Override public CommandLauncher launch(String host, TaskListener listener) throws IOException, InterruptedException { return new CommandLauncher(command,new EnvVars("SLAVE",host)); }
@Override public CommandLauncher launch(String host, TaskListener listener) throws IOException, InterruptedException { return new CommandLauncher(command,new EnvVars("SLAVE",host)); }
/** * Invoked by XStream when this object is read into memory. */ protected Object readResolve() { // convert the old format to the new one if (launcher == null) { launcher = (agentCommand == null || agentCommand.trim().length() == 0) ? new JNLPLauncher(false) : new CommandLauncher(agentCommand); } if(nodeProperties==null) nodeProperties = new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Jenkins.getInstance().getNodesObject()); return this; }
/** * Invoked by XStream when this object is read into memory. */ private Object readResolve() { // convert the old format to the new one if(command!=null && agentCommand==null) { if(command.length()>0) command += ' '; agentCommand = command+"java -jar ~/bin/slave.jar"; } if (command!=null || localFS!=null) OldDataMonitor.report(Hudson.getInstance(), "1.69"); if (launcher == null) { launcher = (agentCommand == null || agentCommand.trim().length() == 0) ? new JNLPLauncher() : new CommandLauncher(agentCommand); } if(nodeProperties==null) nodeProperties = new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Hudson.getInstance()); return this; }
/** * Invoked by XStream when this object is read into memory. */ private Object readResolve() { // convert the old format to the new one if(command!=null && agentCommand==null) { if(command.length()>0) command += ' '; agentCommand = command+"java -jar ~/bin/slave.jar"; } if (command!=null || localFS!=null) OldDataMonitor.report(Hudson.getInstance(), "1.69"); if (launcher == null) { launcher = (agentCommand == null || agentCommand.trim().length() == 0) ? new JNLPLauncher() : new CommandLauncher(agentCommand); } if(nodeProperties==null) nodeProperties = new DescribableList<NodeProperty<?>,NodePropertyDescriptor>(Hudson.getInstance()); return this; }