public class NodePoolSSHLauncher
extends hudson.slaves.ComputerLauncher
Constructor and Description |
---|
NodePoolSSHLauncher(String host,
int port,
String credentialsId,
String jvmOptions,
NodePoolJDKInstaller jdkInstaller,
String prefixStartSlaveCmd,
String suffixStartSlaveCmd,
int launchTimeoutSeconds,
Integer maxNumRetries,
Integer retryWaitTimeSeconds,
hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy)
Constructor SSHLauncher creates a new SSHLauncher instance.
|
Modifier and Type | Method and Description |
---|---|
com.trilead.ssh2.Connection |
getConnection() |
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials |
getCredentials()
Returns this launcher's credentials.
|
String |
getCredentialsId() |
String |
getHost() |
String |
getJvmOptions() |
int |
getLaunchTimeoutSeconds() |
int |
getMaxNumRetries() |
int |
getPort() |
String |
getPrefixStartSlaveCmd() |
int |
getRetryWaitTimeSeconds() |
hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy |
getSshHostKeyVerificationStrategy() |
String |
getSuffixStartSlaveCmd() |
NodePoolJDKInstaller |
getToolInstaller() |
void |
launch(hudson.slaves.SlaveComputer computer,
hudson.model.TaskListener tl)
Launches the JDK/JRE installer if needed, copies over the Jenkins agent JAR file, and executes the agent.
|
protected void |
openConnection(hudson.model.TaskListener tl,
hudson.slaves.SlaveComputer computer) |
protected void |
reportEnvironment(hudson.model.TaskListener tl,
hudson.slaves.SlaveComputer computer) |
public NodePoolSSHLauncher(String host, int port, String credentialsId, String jvmOptions, NodePoolJDKInstaller jdkInstaller, String prefixStartSlaveCmd, String suffixStartSlaveCmd, int launchTimeoutSeconds, Integer maxNumRetries, Integer retryWaitTimeSeconds, hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy)
host
- The host to connect to.port
- The port to connect on.credentialsId
- The credentials to connect as.jvmOptions
- Options passed to the java vm.jdkInstaller
- The jdk installer that will be used.prefixStartSlaveCmd
- This will prefix the start slave command. For instance if you want to execute the command with a different shell.suffixStartSlaveCmd
- This will suffix the start slave command.launchTimeoutSeconds
- Launch timeout in secondsmaxNumRetries
- The number of times to retry connection if the SSH connection is refused during initial connectretryWaitTimeSeconds
- The number of seconds to wait between retriessshHostKeyVerificationStrategy
- the ssh host key verification strategypublic NodePoolJDKInstaller getToolInstaller()
public String getHost()
public int getPort()
public String getJvmOptions()
public String getPrefixStartSlaveCmd()
public String getSuffixStartSlaveCmd()
public int getLaunchTimeoutSeconds()
public int getMaxNumRetries()
public int getRetryWaitTimeSeconds()
public hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy getSshHostKeyVerificationStrategy()
public String getCredentialsId()
public com.trilead.ssh2.Connection getConnection()
public void launch(hudson.slaves.SlaveComputer computer, hudson.model.TaskListener tl) throws InterruptedException
launch
in class hudson.slaves.ComputerLauncher
computer
- the slave computer referencetl
- the task listenerInterruptedException
- if an error occurs launchingpublic com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentials()
protected void openConnection(hudson.model.TaskListener tl, hudson.slaves.SlaveComputer computer) throws IOException, InterruptedException
IOException
InterruptedException
protected void reportEnvironment(hudson.model.TaskListener tl, hudson.slaves.SlaveComputer computer) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2018. All rights reserved.