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 ClassesNested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverterNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGitTool(String name, String home, List<? extends ToolProperty<?>> properties) Constructor for GitTool. -
Method Summary
Modifier and TypeMethodDescriptionforEnvironment(EnvVars environment) forNode(Node node, TaskListener log) static GitToolReturns the default installation.getGitExe.static voidonLoaded()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-Listof properties for this tool
-
-
Method Details
-
getGitExe
getGitExe.- Returns:
Stringthat 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:
forNodein interfaceNodeSpecific<GitTool>- Throws:
IOExceptionInterruptedException
-
forEnvironment
- Specified by:
forEnvironmentin interfaceEnvironmentSpecific<GitTool>
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<ToolInstallation>- Overrides:
getDescriptorin classAbstractDescribableImpl<ToolInstallation>
-
onLoaded
-