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 Modifier and Type Class Description static class
DockerCommand.DockerCommandDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static com.cloudbees.plugins.credentials.CredentialsMatcher
CREDENTIALS_MATCHER
-
Constructor Summary
Constructors Constructor Description DockerCommand()
DockerCommand(org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint dockerRegistryEndpoint)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DescriptorExtensionList<DockerCommand,DockerCommand.DockerCommandDescriptor>
all()
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)
DockerCommand.DockerCommandDescriptor
getDescriptor()
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint
getDockerRegistryEndpoint()
String
getInfoString()
protected Object
readResolve()
-
-
-
Method Detail
-
getDockerRegistryEndpoint
public org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint getDockerRegistryEndpoint()
-
readResolve
protected Object readResolve()
-
getAuthConfig
public com.github.dockerjava.api.model.AuthConfig getAuthConfig(Job<?,?> project)
-
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
protected static DockerBuilder.Config getConfig(AbstractBuild<?,?> build)
-
getDescriptor
public DockerCommand.DockerCommandDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<DockerCommand>
-
all
public static DescriptorExtensionList<DockerCommand,DockerCommand.DockerCommandDescriptor> all()
-
getInfoString
public String 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
-
-