Package sh.createos.jenkins.sandbox
Class SandboxTemplate
- All Implemented Interfaces:
Describable<SandboxTemplate>,Serializable
public class SandboxTemplate
extends AbstractDescribableImpl<SandboxTemplate>
implements Serializable
Configuration template for a CreateOS Sandbox agent.
Like PodTemplate in the Kubernetes plugin — defines what kind of sandbox to create. In Go terms, this is a config struct that gets serialized to/from Jenkins XML.
Users configure these in Jenkins UI under Manage Jenkins > Clouds > CreateOS.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExposes sandbox template metadata and validation to Jenkins. -
Constructor Summary
ConstructorsConstructorDescriptionSandboxTemplate(String label, String shape, String rootfs) Creates a sandbox template with its required Jenkins label, shape, and root filesystem. -
Method Summary
Modifier and TypeMethodDescriptionintgetDisks()int0 means never idle out, which only a reused agent may do: a one-shot agent would leak.getLabel()Returns configured private network ids or names as normalized request values.getShape()booleanbooleanbooleanprotected ObjectMigrates templates written before the launch method became describable.voidsetAllowPipelineOverrides(boolean allowPipelineOverrides) voidsetDeleteOnRestart(boolean deleteOnRestart) voidsetDiskMiB(int diskMiB) voidsetDisks(List<CreateOSDiskAttachment> disks) voidsetIdleMinutes(int idleMinutes) voidsetLauncher(CreateOSLaunchMethod launcher) voidsetNetworks(String networks) voidvoidsetRemoteFs(String remoteFs) voidsetReuseAgent(boolean reuseAgent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
SandboxTemplate
Creates a sandbox template with its required Jenkins label, shape, and root filesystem.
-
-
Method Details
-
getLabel
-
getShape
-
getRootfs
-
getRemoteFs
-
setRemoteFs
-
getRegion
-
setRegion
-
getDiskMiB
public int getDiskMiB() -
setDiskMiB
@DataBoundSetter public void setDiskMiB(int diskMiB) -
getLauncher
-
setLauncher
-
readResolve
Migrates templates written before the launch method became describable.The old form stored the transport as a string beside two SSH fields that were meaningless for inbound agents; the public key is now derived from the credential, so it is dropped.
-
isAllowPipelineOverrides
public boolean isAllowPipelineOverrides() -
setAllowPipelineOverrides
@DataBoundSetter public void setAllowPipelineOverrides(boolean allowPipelineOverrides) -
getNetworks
-
setNetworks
-
getNetworkIdList
Returns configured private network ids or names as normalized request values. -
getDisks
-
setDisks
-
getIdleMinutes
public int getIdleMinutes()0 means never idle out, which only a reused agent may do: a one-shot agent would leak. -
setIdleMinutes
@DataBoundSetter public void setIdleMinutes(int idleMinutes) -
isDeleteOnRestart
public boolean isDeleteOnRestart() -
setDeleteOnRestart
@DataBoundSetter public void setDeleteOnRestart(boolean deleteOnRestart) -
isReuseAgent
public boolean isReuseAgent() -
setReuseAgent
@DataBoundSetter public void setReuseAgent(boolean reuseAgent)
-