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 file
bin/docker
.
Use <d:selectDockerTool field="toolName" xmlns:d="/lib/docker/commons/"/>
to customize.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverter
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionDockerTool
(String name, String home, List<? extends ToolProperty<?>> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildEnvVars
(EnvVars env) forEnvironment
(EnvVars environment) 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 Details
-
DockerTool
@DataBoundConstructor public DockerTool(String name, String home, List<? extends ToolProperty<?>> properties)
-
-
Method Details
-
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
- 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
- Overrides:
buildEnvVars
in classToolInstallation
-