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 ClassesNested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverterNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionDockerTool(String name, String home, List<? extends ToolProperty<?>> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildEnvVars(EnvVars env) forEnvironment(EnvVars environment) forNode(Node node, TaskListener log) static StringgetExecutable(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, writeReplaceMethods 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 casenodeis not nullenv- optionally, environment variables to use when expanding the home directory- Returns:
dockeror an absolute path- Throws:
IOExceptionInterruptedException
-
forEnvironment
- Specified by:
forEnvironmentin interfaceEnvironmentSpecific<DockerTool>
-
forNode
public DockerTool forNode(@NonNull Node node, TaskListener log) throws IOException, InterruptedException - Specified by:
forNodein interfaceNodeSpecific<DockerTool>- Throws:
IOExceptionInterruptedException
-
buildEnvVars
- Overrides:
buildEnvVarsin classToolInstallation
-