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
IOException
InterruptedException
public void close() throws IOException
IOException
public String createVolume(hudson.model.TaskListener listener) throws IOException, InterruptedException
createVolume
in class DockerDriver
IOException
InterruptedException
public boolean hasVolume(hudson.model.TaskListener listener, String name) throws IOException, InterruptedException
hasVolume
in class DockerDriver
IOException
InterruptedException
public boolean hasContainer(hudson.model.TaskListener listener, String id) throws IOException, InterruptedException
hasContainer
in class DockerDriver
IOException
InterruptedException
public Container launchRemotingContainer(hudson.model.TaskListener listener, String image, String volume, DockerComputer computer) throws IOException, InterruptedException
launchRemotingContainer
in class DockerDriver
IOException
InterruptedException
public Container launchBuildContainer(hudson.model.TaskListener listener, String image, Container remotingContainer, List<Hint> hints) throws IOException, InterruptedException
launchBuildContainer
in class DockerDriver
IOException
InterruptedException
protected void injectJenkinsUnixGroup(hudson.Launcher launcher, String containerId) throws IOException, InterruptedException
IOException
InterruptedException
protected void injectJenkinsUnixUser(hudson.Launcher launcher, String containerId) throws IOException, InterruptedException
IOException
InterruptedException
protected void injectTrampoline(hudson.Launcher launcher, String containerId) throws IOException, InterruptedException
IOException
InterruptedException
protected void getFileContent(hudson.Launcher launcher, String containerId, String filename, OutputStream outputStream) throws IOException, InterruptedException
IOException
InterruptedException
protected int putFileContent(hudson.Launcher launcher, String containerId, String path, String filename, byte[] content) throws IOException, InterruptedException
IOException
InterruptedException
protected int putFileContent(hudson.Launcher launcher, String containerId, String path, String filename, byte[] content, Integer mode) throws IOException, InterruptedException
IOException
InterruptedException
public hudson.Proc execInContainer(hudson.model.TaskListener listener, String containerId, hudson.Launcher.ProcStarter starter) throws IOException, InterruptedException
execInContainer
in class DockerDriver
IOException
InterruptedException
public void removeContainer(hudson.model.TaskListener listener, Container instance) throws IOException, InterruptedException
removeContainer
in class DockerDriver
IOException
InterruptedException
public Container launchSideContainer(hudson.model.TaskListener listener, String image, Container remotingContainer, List<Hint> hints) throws IOException, InterruptedException
launchSideContainer
in class DockerDriver
IOException
InterruptedException
public void pullImage(hudson.model.TaskListener listener, String image) throws IOException, InterruptedException
pullImage
in class DockerDriver
IOException
InterruptedException
public boolean checkImageExists(hudson.model.TaskListener listener, String image) throws IOException, InterruptedException
checkImageExists
in class DockerDriver
IOException
InterruptedException
public void buildDockerfile(hudson.model.TaskListener listener, String dockerfilePath, String tag, boolean pull) throws IOException, InterruptedException
buildDockerfile
in class DockerDriver
IOException
InterruptedException
public String serverVersion(hudson.model.TaskListener listener) throws IOException, InterruptedException
DockerDriver
serverVersion
in class DockerDriver
IOException
InterruptedException
public boolean usesSwarmMode(hudson.model.TaskListener listener) throws IOException, InterruptedException
IOException
InterruptedException
public void prependArgs(hudson.util.ArgumentListBuilder args)
Copyright © 2016–2017. All rights reserved.