Package it.dockins.dockerslaves
Class DefaultDockerProvisioner
java.lang.Object
it.dockins.dockerslaves.spi.DockerProvisioner
it.dockins.dockerslaves.DefaultDockerProvisioner
Provision
Containers based on $ContainerSetDefinition to provide a queued task
an executor.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContainersContextprotected final DockerDriverprotected final Stringprotected final Stringprotected final ContainerSetDefinition -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDockerProvisioner(ContainersContext context, DockerDriver driver, ContainerSetDefinition spec, String remotingImage, String scmImage) -
Method Summary
Modifier and TypeMethodDescriptionvoidclean(TaskListener listener) Cleanup all allocated resourceslaunchBuildContainers(Launcher.ProcStarter starter, TaskListener listener) Launch build environment as defined by (@link Job}'sContainerSetDefinition.launchBuildProcess(Launcher.ProcStarter procStarter, TaskListener listener) Run specified process inside the main build containerlaunchRemotingContainer(DockerComputer computer, TaskListener listener) Launch a container to host jenkins remoting agent and establish a channel as a Jenkins slave.launchScmContainer(TaskListener listener) Launch a container with adequate tools to run the SCM checkout build phase.
-
Field Details
-
context
-
driver
-
spec
-
remotingImage
-
scmImage
-
-
Constructor Details
-
DefaultDockerProvisioner
public DefaultDockerProvisioner(ContainersContext context, DockerDriver driver, ContainerSetDefinition spec, String remotingImage, String scmImage) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
-
Method Details
-
getContext
- Specified by:
getContextin classDockerProvisioner
-
launchRemotingContainer
public Container launchRemotingContainer(DockerComputer computer, TaskListener listener) throws IOException, InterruptedException Description copied from class:DockerProvisionerLaunch a container to host jenkins remoting agent and establish a channel as a Jenkins slave.- Specified by:
launchRemotingContainerin classDockerProvisioner- Throws:
IOExceptionInterruptedException
-
launchBuildContainers
public Container launchBuildContainers(Launcher.ProcStarter starter, TaskListener listener) throws IOException, InterruptedException Description copied from class:DockerProvisionerLaunch build environment as defined by (@link Job}'sContainerSetDefinition.- Specified by:
launchBuildContainersin classDockerProvisioner- Throws:
IOExceptionInterruptedException
-
launchScmContainer
Description copied from class:DockerProvisionerLaunch a container with adequate tools to run the SCM checkout build phase.- Specified by:
launchScmContainerin classDockerProvisioner- Throws:
IOExceptionInterruptedException
-
launchBuildProcess
public Proc launchBuildProcess(Launcher.ProcStarter procStarter, TaskListener listener) throws IOException, InterruptedException Description copied from class:DockerProvisionerRun specified process inside the main build container- Specified by:
launchBuildProcessin classDockerProvisioner- Throws:
IOExceptionInterruptedException
-
clean
Description copied from class:DockerProvisionerCleanup all allocated resources- Specified by:
cleanin classDockerProvisioner- Throws:
IOExceptionInterruptedException
-