Package jenkins.plugins.jclouds.compute
Class JCloudsLauncher
java.lang.Object
hudson.model.AbstractDescribableImpl<ComputerLauncher>
hudson.slaves.ComputerLauncher
jenkins.plugins.jclouds.compute.JCloudsLauncher
- All Implemented Interfaces:
ExtensionPoint
,Describable<ComputerLauncher>
The launcher that launches the jenkins agent.jar on the Agent. Uses the SSHKeyPair configured in the cloud profile settings, and logs in to the server via
SSH, and starts the agent.jar.
- Author:
- Vijay Kiran
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.slaves.ComputerLauncher
LIST
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getConnectionAddress
(NodeMetadata nodeMetadata, PrintStream logger, String preferredAddress) Get the potential address to connect to, opting for public first and then private.void
launch
(SlaveComputer computer, TaskListener listener) Launch the Jenkins Slave on the SlaveComputer.Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, isLaunchSupported, launch
-
Constructor Details
-
JCloudsLauncher
public JCloudsLauncher()
-
-
Method Details
-
launch
public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException Launch the Jenkins Slave on the SlaveComputer.- Overrides:
launch
in classComputerLauncher
- Parameters:
computer
- The node on which to launch the slave.listener
- Task listener for notification purposes.- Throws:
IOException
- if an error occurs.InterruptedException
- if the launch gets interrupted.
-
getConnectionAddress
public static String getConnectionAddress(NodeMetadata nodeMetadata, PrintStream logger, String preferredAddress) Get the potential address to connect to, opting for public first and then private.- Parameters:
nodeMetadata
- The meta data of the configured node.logger
- Reference to a PrintStream for logging purposes.preferredAddress
- An optional String, containing an address/prefix expression which will be used for matching.- Returns:
- A String containing the IP address to connect to.
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<ComputerLauncher>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ComputerLauncher>
-