Package it.dockins.dockerslaves
Class DockerSlave
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Node
hudson.model.Slave
it.dockins.dockerslaves.api.OneShotSlave
it.dockins.dockerslaves.DockerSlave
- All Implemented Interfaces:
ExtensionPoint,Describable<Node>,ModelObject,PersistenceRoot,ReconfigurableDescribable<Node>,Saveable,SearchableModelObject,SearchItem,AccessControlled,EphemeralNode,Serializable,OnMaster
An $
EphemeralNode using docker containers to host the build processes.
Slave is dedicated to a specific $Job, and even better to a specific build, but when this class
is created the build does not yet exists due to Jenkins lifecycle.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis listener get notified as the build is going to start.static classThis listener get notified as the build completes the SCM checkout.Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class it.dockins.dockerslaves.api.OneShotSlave
RUN_LISTENERFields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS -
Constructor Summary
ConstructorsConstructorDescriptionDockerSlave(String name, String nodeDescription, String labelString, DockerProvisioner provisioner, Queue.Item queueItem) -
Method Summary
Modifier and TypeMethodDescriptionasNode()createLauncher(TaskListener listener) Create a custom $Launcherwhich relies ondocker runto start a new processlongMethods inherited from class it.dockins.dockerslaves.api.OneShotSlave
getNumExecutorsMethods inherited from class hudson.model.Slave
drainLabelsToTrim, equals, getClockDifferenceCallable, getDescriptor, getLabelAtomSet, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, readResolve, save, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toStringMethods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getConfigFile, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getRootDir, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, reconfigure, setTemporaryOfflineCause, toComputerMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Field Details
-
SLAVE_ROOT
- See Also:
-
-
Constructor Details
-
DockerSlave
public DockerSlave(String name, String nodeDescription, String labelString, DockerProvisioner provisioner, Queue.Item queueItem) throws Descriptor.FormException, IOException - Throws:
Descriptor.FormExceptionIOException
-
-
Method Details
-
createComputer
- Overrides:
createComputerin classSlave
-
asNode
-
getComputer
- Overrides:
getComputerin classOneShotSlave
-
getQueueItemId
public long getQueueItemId() -
createLauncher
Create a custom $Launcherwhich relies ondocker runto start a new process- Overrides:
createLauncherin classOneShotSlave
-