public class DockerSlave extends OneShotSlave
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.Modifier and Type | Class and Description |
---|---|
static class |
DockerSlave.DockerSlaveRunListener
This listener get notified as the build is going to start.
|
static class |
DockerSlave.DockerSlaveSCMListener
This listener get notified as the build completes the SCM checkout.
|
hudson.model.Slave.JnlpJar, hudson.model.Slave.SlaveDescriptor
Modifier and Type | Field and Description |
---|---|
static String |
SLAVE_ROOT |
RUN_LISTENER
Constructor and Description |
---|
DockerSlave(String name,
String nodeDescription,
String labelString,
DockerProvisioner provisioner,
hudson.model.Queue.Item queueItem) |
Modifier and Type | Method and Description |
---|---|
DockerSlave |
asNode() |
DockerComputer |
createComputer() |
hudson.Launcher |
createLauncher(hudson.model.TaskListener listener)
Create a custom $
Launcher which relies on docker run to start a new process |
DockerComputer |
getComputer() |
long |
getQueueItemId() |
getNumExecutors
equals, getClockDifferenceCallable, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, readResolve, setLabelString, setLauncher, setMode, setNodeName, setRetentionStrategy, setUserId, toString
canTake, canTake, checkPermission, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, hasPermission, isAcceptingTasks, isHoldOffLaunchUntilSave, reconfigure, save, toComputer
public static final String SLAVE_ROOT
public DockerSlave(String name, String nodeDescription, String labelString, DockerProvisioner provisioner, hudson.model.Queue.Item queueItem) throws hudson.model.Descriptor.FormException, IOException
hudson.model.Descriptor.FormException
IOException
public DockerComputer createComputer()
createComputer
in class hudson.model.Slave
public DockerSlave asNode()
public DockerComputer getComputer()
getComputer
in class OneShotSlave
public long getQueueItemId()
public hudson.Launcher createLauncher(hudson.model.TaskListener listener)
Launcher
which relies on docker run
to start a new processcreateLauncher
in class OneShotSlave
Copyright © 2016–2017. All rights reserved.