Class DockerCommand
java.lang.Object
org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
- All Implemented Interfaces:
ExtensionPoint
,Describable<DockerCommand>
- Direct Known Subclasses:
CommitCommand
,CreateContainerCommand
,CreateImageCommand
,ExecCreateAndStartCommand
,ExecCreateCommand
,ExecStartCommand
,KillCommand
,PullImageCommand
,PushImageCommand
,RemoveAllCommand
,RemoveCommand
,RemoveImageCommand
,RestartCommand
,SaveImageCommand
,StartByImageIdCommand
,StartCommand
,StopAllCommand
,StopByImageIdCommand
,StopCommand
,TagImageCommand
public abstract class DockerCommand
extends Object
implements Describable<DockerCommand>, ExtensionPoint
Parent class of all Docker commands.
- Author:
- vjuranek
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.cloudbees.plugins.credentials.CredentialsMatcher
-
Constructor Summary
ConstructorDescriptionDockerCommand
(org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint dockerRegistryEndpoint) -
Method Summary
Modifier and TypeMethodDescriptionall()
protected static DockerContainerConsoleAction
attachContainerOutput
(AbstractBuild build, String containerId) Only the first container started is attached!abstract void
execute
(Launcher launcher, AbstractBuild build, ConsoleLogger console) com.github.dockerjava.api.model.AuthConfig
getAuthConfig
(Job<?, ?> project) protected static com.github.dockerjava.api.DockerClient
getClient
(AbstractBuild<?, ?> build, com.github.dockerjava.api.model.AuthConfig authConfig) static com.github.dockerjava.api.DockerClient
getClient
(Descriptor<?> descriptor, String dockerUrlRes, String dockerVersionRes, String dockerCertPathRes, com.github.dockerjava.api.model.AuthConfig authConfig) protected static DockerBuilder.Config
getConfig
(AbstractBuild<?, ?> build) org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint
protected Object
-
Field Details
-
CREDENTIALS_MATCHER
public static final com.cloudbees.plugins.credentials.CredentialsMatcher CREDENTIALS_MATCHER
-
-
Constructor Details
-
DockerCommand
public DockerCommand() -
DockerCommand
public DockerCommand(org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint dockerRegistryEndpoint)
-
-
Method Details
-
getDockerRegistryEndpoint
public org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint getDockerRegistryEndpoint() -
readResolve
-
getAuthConfig
-
execute
public abstract void execute(Launcher launcher, AbstractBuild build, ConsoleLogger console) throws com.github.dockerjava.api.exception.DockerException, AbortException - Throws:
com.github.dockerjava.api.exception.DockerException
AbortException
-
getClient
protected static com.github.dockerjava.api.DockerClient getClient(AbstractBuild<?, ?> build, com.github.dockerjava.api.model.AuthConfig authConfig) -
getClient
public static com.github.dockerjava.api.DockerClient getClient(Descriptor<?> descriptor, String dockerUrlRes, String dockerVersionRes, String dockerCertPathRes, com.github.dockerjava.api.model.AuthConfig authConfig) -
getConfig
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<DockerCommand>
-
all
-
getInfoString
-
attachContainerOutput
protected static DockerContainerConsoleAction attachContainerOutput(AbstractBuild build, String containerId) throws com.github.dockerjava.api.exception.DockerException Only the first container started is attached!- Throws:
com.github.dockerjava.api.exception.DockerException
-