Class Deploy
java.lang.Object
org.jenkinsci.plugins.vsphere.VSphereBuildStep
org.jenkinsci.plugins.vsphere.builders.Deploy
- All Implemented Interfaces:
ExtensionPoint,Describable<VSphereBuildStep>,BuildStep,SimpleBuildStep
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
VSphereBuildStep.VSphereBuildStepDescriptorNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
sourceCloud, vsphereFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClone()Optional: cores per socket to create the VM with, asReconfigureCpu's; may use variables.Optional: number of vCPUs to create the VM with, asReconfigureCpu's; may use variables.Optional: CPU reservation in MHz to create the VM with, asReconfigureCpu's; may use variables.getHost()Canonical form, for pipeline/API/JCasC consumers.For the classic config UI textbox, and pipeline/JCasC callers that prefer a plain string.Opt-in override of the cloud's default: only consider hosts that currently have at least as much memory free as the VM is configured with, so it is not swapped by the hypervisor.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireAvailableMemory().Opt-in override of the cloud's default: only consider hosts with at least as many physical CPU cores as the VM has vCPUs.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireCores().Opt-in override of the cloud's default: only consider hosts with at least as much physical RAM as the VM is configured with.For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireMemory().getIP()Optional: memory size in MB to create the VM with, asReconfigureMemory's; may use variables.getProjectAction(AbstractProject<?, ?> abstractProject) Collection<? extends Action> getProjectActions(AbstractProject<?, ?> abstractProject) intbooleanWhether failing to obtain the VM's IP address within the timeout fails this step (default: only warn).booleanbooleanvoidperform(Run<?, ?> run, FilePath filePath, Launcher launcher, TaskListener listener) booleanprebuild(AbstractBuild<?, ?> abstractBuild, BuildListener buildListener) voidsetCoresPerSocket(String coresPerSocket) voidsetCpuCores(String cpuCores) voidsetCpuLimitMHz(String cpuLimitMHz) voidsetFailOnNoAddress(boolean failOnNoAddress) voidvoidsetHostSelectionCandidates(Collection<String> hostSelectionCandidates) Takes a flat list of individual host names - the natural shape for a pipeline or JCasC YAML caller that already has one.voidsetHostSelectionCandidatesAsString(String hostSelectionCandidatesCsv) voidsetHostSelectionMode(String hostSelectionMode) voidsetHostSelectionRequireAvailableMemory(Boolean hostSelectionRequireAvailableMemory) voidsetHostSelectionRequireAvailableMemoryAsString(String hostSelectionRequireAvailableMemoryAsString) voidsetHostSelectionRequireCores(Boolean hostSelectionRequireCores) voidsetHostSelectionRequireCoresAsString(String hostSelectionRequireCoresAsString) voidsetHostSelectionRequireMemory(Boolean hostSelectionRequireMemory) voidsetHostSelectionRequireMemoryAsString(String hostSelectionRequireMemoryAsString) voidsetHostWeightFreeCpuMhz(String hostWeightFreeCpuMhz) voidsetHostWeightFreeCpuPercent(String hostWeightFreeCpuPercent) voidsetHostWeightFreeMemoryMB(String hostWeightFreeMemoryMB) voidsetHostWeightFreeMemoryPercent(String hostWeightFreeMemoryPercent) voidsetMemorySize(String memorySize) Methods inherited from class org.jenkinsci.plugins.vsphere.VSphereBuildStep
all, allowDelete, getDescriptor, getSourceCloud, getVsphere, perform, setSourceCloud, setVsphereMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
Deploy
@DataBoundConstructor public Deploy(String template, String clone, boolean linkedClone, String resourcePool, String cluster, String datastore, String folder, String customizationSpec, Integer timeoutInSeconds, boolean powerOn) throws VSphereException - Throws:
VSphereException
-
-
Method Details
-
getTemplate
-
getClone
-
isLinkedClone
public boolean isLinkedClone() -
getCluster
-
getResourcePool
-
getDatastore
-
getFolder
-
getCustomizationSpec
-
isPowerOn
public boolean isPowerOn() -
getTimeoutInSeconds
public int getTimeoutInSeconds() -
getHost
-
isFailOnNoAddress
public boolean isFailOnNoAddress()Whether failing to obtain the VM's IP address within the timeout fails this step (default: only warn). -
setFailOnNoAddress
@DataBoundSetter public void setFailOnNoAddress(boolean failOnNoAddress) -
setHost
-
getHostSelectionMode
-
setHostSelectionMode
-
getHostSelectionCandidates
Canonical form, for pipeline/API/JCasC consumers. -
setHostSelectionCandidates
Takes a flat list of individual host names - the natural shape for a pipeline or JCasC YAML caller that already has one. SeesetHostSelectionCandidatesAsString(java.lang.String)for the comma-separated-string equivalent (used by the classic UI textbox). Both are kept as separate, concretely-typed properties rather than one that accepts either shape: Jenkins' JCasC introspection resolves exactly one configurator per property type, so a singleObject-typed (or overloaded) setter is not reliably usable from YAML, even though pipeline's looser binding tolerates it. -
getHostSelectionCandidatesAsString
For the classic config UI textbox, and pipeline/JCasC callers that prefer a plain string. Blank means "inherit the cloud's default candidate list" (seevSphereCloud.getHostSelectionCandidates()); a single comma explicitly overrides to "no restriction at this call site" - seeVSphereHostSelection.toAllowListString(java.util.Set<java.lang.String>). -
setHostSelectionCandidatesAsString
-
getCpuCores
Optional: number of vCPUs to create the VM with, asReconfigureCpu's; may use variables. -
setCpuCores
-
getCoresPerSocket
Optional: cores per socket to create the VM with, asReconfigureCpu's; may use variables. -
setCoresPerSocket
-
getCpuLimitMHz
Optional: CPU reservation in MHz to create the VM with, asReconfigureCpu's; may use variables. -
setCpuLimitMHz
-
getMemorySize
Optional: memory size in MB to create the VM with, asReconfigureMemory's; may use variables. -
setMemorySize
-
getHostSelectionRequireCores
Opt-in override of the cloud's default: only consider hosts with at least as many physical CPU cores as the VM has vCPUs.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireCores
-
getHostSelectionRequireCoresAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireCores(). -
setHostSelectionRequireCoresAsString
@DataBoundSetter public void setHostSelectionRequireCoresAsString(String hostSelectionRequireCoresAsString) -
getHostSelectionRequireMemory
Opt-in override of the cloud's default: only consider hosts with at least as much physical RAM as the VM is configured with.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireMemory
-
getHostSelectionRequireMemoryAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireMemory(). -
setHostSelectionRequireMemoryAsString
@DataBoundSetter public void setHostSelectionRequireMemoryAsString(String hostSelectionRequireMemoryAsString) -
getHostSelectionRequireAvailableMemory
Opt-in override of the cloud's default: only consider hosts that currently have at least as much memory free as the VM is configured with, so it is not swapped by the hypervisor.null(the default) inherits the cloud's setting;true/falseoverride it for this call site. -
setHostSelectionRequireAvailableMemory
@DataBoundSetter public void setHostSelectionRequireAvailableMemory(Boolean hostSelectionRequireAvailableMemory) -
getHostSelectionRequireAvailableMemoryAsString
For the classic config UI, where an unset ("inherit") value has to survive a round trip as an empty string; pipeline and JCasC callers should usegetHostSelectionRequireAvailableMemory(). -
setHostSelectionRequireAvailableMemoryAsString
@DataBoundSetter public void setHostSelectionRequireAvailableMemoryAsString(String hostSelectionRequireAvailableMemoryAsString) -
getHostWeightFreeCpuMhz
-
setHostWeightFreeCpuMhz
-
getHostWeightFreeCpuPercent
-
setHostWeightFreeCpuPercent
-
getHostWeightFreeMemoryMB
-
setHostWeightFreeMemoryMB
-
getHostWeightFreeMemoryPercent
-
setHostWeightFreeMemoryPercent
-
getIP
- Overrides:
getIPin classVSphereBuildStep
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath filePath, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceSimpleBuildStep- Specified by:
performin classVSphereBuildStep- Throws:
InterruptedExceptionIOException
-
prebuild
-
getProjectAction
- Specified by:
getProjectActionin interfaceBuildStep
-
getProjectActions
- Specified by:
getProjectActionsin interfaceBuildStep
-
getRequiredMonitorService
- Specified by:
getRequiredMonitorServicein interfaceBuildStep
-