public ComputerLauncher getLauncher() { if (launcher == null && !StringUtils.isEmpty(agentCommand)) { try { launcher = (ComputerLauncher) Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.slaves.CommandLauncher").getConstructor(String.class, EnvVars.class).newInstance(agentCommand, null); agentCommand = null; save(); } catch (Exception x) { LOGGER.log(Level.WARNING, "could not update historical agentCommand setting to CommandLauncher", x); } } // Default launcher does not use Work Directory return launcher == null ? new JNLPLauncher(false) : launcher; }
/** * Constructor. * @param tunnel Tunnel settings * @param vmargs JVM arguments * @param workDirSettings Settings for Work Directory management in Remoting. * If {@code null}, {@link RemotingWorkDirSettings#getEnabledDefaults()} * will be used to enable work directories by default in new agents. * @since 2.68 */ @Deprecated public JNLPLauncher(@CheckForNull String tunnel, @CheckForNull String vmargs, @CheckForNull RemotingWorkDirSettings workDirSettings) { this(tunnel, vmargs); if (workDirSettings != null) { setWorkDirSettings(workDirSettings); } }
@Override protected JNLPLauncher instance(Mapping config, ConfigurationContext context) throws ConfiguratorException { try { return super.instance(config, context); } catch (ConfiguratorException e) { // see https://issues.jenkins-ci.org/browse/JENKINS-51603 final CNode tunnel = config.get("tunnel"); final CNode vmargs = config.get("vmargs"); return new JNLPLauncher(tunnel != null ? tunnel.asScalar().getValue() : null, vmargs != null ? vmargs.asScalar().getValue() : null); } } }
@Override protected ComputerLauncher createLauncher(final DockerAPI api, final String workdir, final InspectContainerResponse inspect, TaskListener listener) throws IOException, InterruptedException { return new JNLPLauncher(); }
@Override public ComputerLauncher getLauncher() { return new JNLPLauncher(); }
public ComputerLauncher getLauncher() { // Default launcher does not use Work Directory return launcher == null ? new JNLPLauncher(false) : launcher; }
public ComputerLauncher getLauncher() { return launcher == null ? new JNLPLauncher() : launcher; }
public ComputerLauncher getLauncher() { return launcher == null ? new JNLPLauncher() : launcher; }
public ComputerLauncher getLauncher() { return launcher == null ? new JNLPLauncher() : launcher; }
public ComputerLauncher getLauncher() { return launcher == null ? new JNLPLauncher() : launcher; }
@Override public ComputerLauncher createLauncher(@Nonnull JCloudsSlave slave) throws IOException { Jenkins.getActiveInstance().addNode(slave); return new JNLPLauncher(); }
public KubernetesSlave(String podName, PodRepository podRepository, KubernetesCloud kubernetesCloud, Label label) throws Descriptor.FormException,IOException { super(podName, DESCRIPTION, DEFAULT_REMOTE_FS, EXECUTORS, Mode.NORMAL, label == null ? null : label.toString(), new JNLPLauncher(), new SingleUseRetentionStrategy(IDLE_MINUTES), Collections.<NodeProperty<Node>>emptyList()); this.kubernetesCloud = kubernetesCloud; this.podRepository = podRepository; }
@SuppressFBWarnings({ "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", "Since 2.1, tha launcher is injected in constructor but we need this as a fallback for the slaves that survived the upgrade." }) private ComputerLauncher launcher(SlaveComputer computer) throws IOException { if (launcher != null) return launcher; final JCloudsSlave slave = (JCloudsSlave) computer.getNode(); return launcher = slave == null ? new JNLPLauncher() // Return something harmless to prevent NPE : slave.getLauncherFactory().createLauncher(slave) ; } }
/** * 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; }
/** * 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. */ public 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; }
@Override protected JNLPLauncher instance(Mapping config, ConfigurationContext context) throws ConfiguratorException { try { return super.instance(config, context); } catch (ConfiguratorException e) { // see https://issues.jenkins-ci.org/browse/JENKINS-51603 final CNode tunnel = config.get("tunnel"); final CNode vmargs = config.get("vmargs"); return new JNLPLauncher(tunnel != null ? tunnel.asScalar().getValue() : null, vmargs != null ? vmargs.asScalar().getValue() : null); } } }
label, agentLaunchMethod.equalsIgnoreCase("SSH") ? new AzureVMAgentSSHLauncher() : new JNLPLauncher(), retentionStrategy, Arrays.asList(new EnvironmentVariablesNodeProperty(