Class DockerTool
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ToolInstallation>
-
- hudson.tools.ToolInstallation
-
- org.jenkinsci.plugins.docker.commons.tools.DockerTool
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstallation>
,EnvironmentSpecific<DockerTool>
,NodeSpecific<DockerTool>
,Serializable
public class DockerTool extends ToolInstallation implements EnvironmentSpecific<DockerTool>, NodeSpecific<DockerTool>
An installation of Docker. If nonempty, expected to have an executable filebin/docker
. Use<d:selectDockerTool field="toolName" xmlns:d="/lib/docker/commons/"/>
to customize.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DockerTool.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverter
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DockerTool(String name, String home, List<? extends ToolProperty<?>> properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildEnvVars(EnvVars env)
DockerTool
forEnvironment(EnvVars environment)
DockerTool
forNode(Node node, TaskListener log)
static String
getExecutable(String name, Node node, TaskListener listener, EnvVars env)
Gets the executable name to use for a given launcher.-
Methods inherited from class hudson.tools.ToolInstallation
all, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
DockerTool
@DataBoundConstructor public DockerTool(String name, String home, List<? extends ToolProperty<?>> properties)
-
-
Method Detail
-
getExecutable
@NonNull public static String getExecutable(@CheckForNull String name, @CheckForNull Node node, @Nullable TaskListener listener, @CheckForNull EnvVars env) throws IOException, InterruptedException
Gets the executable name to use for a given launcher. Suitable for the first item inArgumentListBuilder
.- Parameters:
name
- the name of the selected tool, or null for the defaultnode
- optionally, a node (such as an agent) on which we are running Dockerlistener
- a listener, required in casenode
is not nullenv
- optionally, environment variables to use when expanding the home directory- Returns:
docker
or an absolute path- Throws:
IOException
InterruptedException
-
forEnvironment
public DockerTool forEnvironment(EnvVars environment)
- Specified by:
forEnvironment
in interfaceEnvironmentSpecific<DockerTool>
-
forNode
public DockerTool forNode(@NonNull Node node, TaskListener log) throws IOException, InterruptedException
- Specified by:
forNode
in interfaceNodeSpecific<DockerTool>
- Throws:
IOException
InterruptedException
-
buildEnvVars
public void buildEnvVars(EnvVars env)
- Overrides:
buildEnvVars
in classToolInstallation
-
-