Package hudson.plugins.git
Class GitTool
java.lang.Object
hudson.model.AbstractDescribableImpl<ToolInstallation>
hudson.tools.ToolInstallation
hudson.plugins.git.GitTool
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstallation>
,EnvironmentSpecific<GitTool>
,NodeSpecific<GitTool>
,Serializable
- Direct Known Subclasses:
JGitApacheTool
,JGitTool
public class GitTool
extends ToolInstallation
implements NodeSpecific<GitTool>, EnvironmentSpecific<GitTool>
Information about Git installation. A GitTool is used to select
between different installations of git, as in "git" or "jgit".
- 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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGitTool
(String name, String home, List<? extends ToolProperty<?>> properties) Constructor for GitTool. -
Method Summary
Modifier and TypeMethodDescriptionforEnvironment
(EnvVars environment) forNode
(Node node, TaskListener log) static GitTool
Returns the default installation.getGitExe.static void
onLoaded()
Methods inherited from class hudson.tools.ToolInstallation
all, buildEnvVars, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
-
Field Details
-
DEFAULT
ConstantDEFAULT="Default"
- See Also:
-
-
Constructor Details
-
GitTool
@DataBoundConstructor public GitTool(String name, String home, List<? extends ToolProperty<?>> properties) Constructor for GitTool.- Parameters:
name
- Tool name (for example, "git" or "jgit")home
- Tool location (usually "git")properties
-List
of properties for this tool
-
-
Method Details
-
getGitExe
getGitExe.- Returns:
String
that will be used to execute git (e.g. "git" or "/usr/bin/git")
-
getDefaultInstallation
Returns the default installation.- Returns:
- default installation
-
forNode
public GitTool forNode(@NonNull Node node, TaskListener log) throws IOException, InterruptedException - Specified by:
forNode
in interfaceNodeSpecific<GitTool>
- Throws:
IOException
InterruptedException
-
forEnvironment
- Specified by:
forEnvironment
in interfaceEnvironmentSpecific<GitTool>
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<ToolInstallation>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ToolInstallation>
-
onLoaded
-