public class CliDockerDriver extends DockerDriver
| Constructor and Description |
|---|
CliDockerDriver(DockerHostConfig dockerHost) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildDockerfile(hudson.model.TaskListener listener,
String dockerfilePath,
String tag,
boolean pull) |
boolean |
checkImageExists(hudson.model.TaskListener listener,
String image) |
void |
close() |
String |
createVolume(hudson.model.TaskListener listener) |
hudson.Proc |
execInContainer(hudson.model.TaskListener listener,
String containerId,
hudson.Launcher.ProcStarter starter) |
protected void |
getFileContent(hudson.Launcher launcher,
String containerId,
String filename,
OutputStream outputStream) |
boolean |
hasContainer(hudson.model.TaskListener listener,
String id) |
boolean |
hasVolume(hudson.model.TaskListener listener,
String name) |
protected void |
injectJenkinsUnixGroup(hudson.Launcher launcher,
String containerId) |
protected void |
injectJenkinsUnixUser(hudson.Launcher launcher,
String containerId) |
protected void |
injectTrampoline(hudson.Launcher launcher,
String containerId) |
Container |
launchBuildContainer(hudson.model.TaskListener listener,
String image,
Container remotingContainer,
List<Hint> hints) |
Container |
launchRemotingContainer(hudson.model.TaskListener listener,
String image,
String volume,
DockerComputer computer) |
Container |
launchSideContainer(hudson.model.TaskListener listener,
String image,
Container remotingContainer,
List<Hint> hints) |
void |
prependArgs(hudson.util.ArgumentListBuilder args) |
void |
pullImage(hudson.model.TaskListener listener,
String image) |
protected int |
putFileContent(hudson.Launcher launcher,
String containerId,
String path,
String filename,
byte[] content) |
protected int |
putFileContent(hudson.Launcher launcher,
String containerId,
String path,
String filename,
byte[] content,
Integer mode) |
void |
removeContainer(hudson.model.TaskListener listener,
Container instance) |
String |
serverVersion(hudson.model.TaskListener listener)
Return server version string, used actually to check connectivity with backend
|
boolean |
usesSwarmMode(hudson.model.TaskListener listener) |
public static final String UTF_8
public CliDockerDriver(DockerHostConfig dockerHost) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void close()
throws IOException
IOExceptionpublic String createVolume(hudson.model.TaskListener listener) throws IOException, InterruptedException
createVolume in class DockerDriverIOExceptionInterruptedExceptionpublic boolean hasVolume(hudson.model.TaskListener listener,
String name)
throws IOException,
InterruptedException
hasVolume in class DockerDriverIOExceptionInterruptedExceptionpublic boolean hasContainer(hudson.model.TaskListener listener,
String id)
throws IOException,
InterruptedException
hasContainer in class DockerDriverIOExceptionInterruptedExceptionpublic Container launchRemotingContainer(hudson.model.TaskListener listener, String image, String volume, DockerComputer computer) throws IOException, InterruptedException
launchRemotingContainer in class DockerDriverIOExceptionInterruptedExceptionpublic Container launchBuildContainer(hudson.model.TaskListener listener, String image, Container remotingContainer, List<Hint> hints) throws IOException, InterruptedException
launchBuildContainer in class DockerDriverIOExceptionInterruptedExceptionprotected void injectJenkinsUnixGroup(hudson.Launcher launcher,
String containerId)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected void injectJenkinsUnixUser(hudson.Launcher launcher,
String containerId)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected void injectTrampoline(hudson.Launcher launcher,
String containerId)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected void getFileContent(hudson.Launcher launcher,
String containerId,
String filename,
OutputStream outputStream)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected int putFileContent(hudson.Launcher launcher,
String containerId,
String path,
String filename,
byte[] content)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected int putFileContent(hudson.Launcher launcher,
String containerId,
String path,
String filename,
byte[] content,
Integer mode)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic hudson.Proc execInContainer(hudson.model.TaskListener listener,
String containerId,
hudson.Launcher.ProcStarter starter)
throws IOException,
InterruptedException
execInContainer in class DockerDriverIOExceptionInterruptedExceptionpublic void removeContainer(hudson.model.TaskListener listener,
Container instance)
throws IOException,
InterruptedException
removeContainer in class DockerDriverIOExceptionInterruptedExceptionpublic Container launchSideContainer(hudson.model.TaskListener listener, String image, Container remotingContainer, List<Hint> hints) throws IOException, InterruptedException
launchSideContainer in class DockerDriverIOExceptionInterruptedExceptionpublic void pullImage(hudson.model.TaskListener listener,
String image)
throws IOException,
InterruptedException
pullImage in class DockerDriverIOExceptionInterruptedExceptionpublic boolean checkImageExists(hudson.model.TaskListener listener,
String image)
throws IOException,
InterruptedException
checkImageExists in class DockerDriverIOExceptionInterruptedExceptionpublic void buildDockerfile(hudson.model.TaskListener listener,
String dockerfilePath,
String tag,
boolean pull)
throws IOException,
InterruptedException
buildDockerfile in class DockerDriverIOExceptionInterruptedExceptionpublic String serverVersion(hudson.model.TaskListener listener) throws IOException, InterruptedException
DockerDriverserverVersion in class DockerDriverIOExceptionInterruptedExceptionpublic boolean usesSwarmMode(hudson.model.TaskListener listener)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void prependArgs(hudson.util.ArgumentListBuilder args)
Copyright © 2016–2017. All rights reserved.