Package io.jenkins.plugins.kubevirt
Class KubeVirtProvisioningLauncher
java.lang.Object
hudson.slaves.ComputerLauncher
io.jenkins.plugins.kubevirt.KubeVirtProvisioningLauncher
- All Implemented Interfaces:
ExtensionPoint,Describable<ComputerLauncher>
A provisioning-aware launcher that handles the full VM lifecycle before
delegating to the real SSH launcher.
This launcher is set on the KubeVirtAgent at construction time,
allowing Jenkins to register the node immediately (making it visible in the
UI as "offline / connecting"). When Jenkins core invokes launch(hudson.slaves.SlaveComputer, hudson.model.TaskListener),
the launcher creates the VM, waits for it to become ready, obtains the IP
address (if needed), creates the real SSH launcher, and then delegates the
actual SSH connection to it.
All provisioning log messages are written to the TaskListener
provided by Jenkins, so they appear live on the agent's
/computer/<name>/log page.
-
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
ConstructorsConstructorDescriptionKubeVirtProvisioningLauncher(String cloudName, String templateName) Creates a new provisioning launcher. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterDisconnect(SlaveComputer computer, TaskListener listener) voidbeforeDisconnect(SlaveComputer computer, TaskListener listener) booleanvoidlaunch(SlaveComputer computer, TaskListener listener) Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, beforeDisconnect, checkJavaVersion, launch
-
Constructor Details
-
KubeVirtProvisioningLauncher
Creates a new provisioning launcher.- Parameters:
cloudName- The name of the KubeVirt cloud (used to look up the cloud at launch time)templateName- The name of the template to provision from
-
-
Method Details
-
isLaunchSupported
public boolean isLaunchSupported()- Overrides:
isLaunchSupportedin classComputerLauncher
-
launch
public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException - Overrides:
launchin classComputerLauncher- Throws:
IOExceptionInterruptedException
-
afterDisconnect
- Overrides:
afterDisconnectin classComputerLauncher
-
beforeDisconnect
- Overrides:
beforeDisconnectin classComputerLauncher
-
getDescriptor
-