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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGitTool.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 GitTool(String name, String home, List<? extends ToolProperty<?>> properties)Constructor for GitTool.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GitToolforEnvironment(EnvVars environment)GitToolforNode(Node node, TaskListener log)static GitToolgetDefaultInstallation()Returns the default installation.GitTool.DescriptorImplgetDescriptor()StringgetGitExe()getGitExe.static voidonLoaded()-
Methods inherited from class hudson.tools.ToolInstallation
all, buildEnvVars, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
-
-
-
-
Field Detail
-
DEFAULT
public static final transient String DEFAULT
ConstantDEFAULT="Default"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
getGitExe
public String getGitExe()
getGitExe.- Returns:
Stringthat will be used to execute git (e.g. "git" or "/usr/bin/git")
-
getDefaultInstallation
public static GitTool 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
public GitTool forEnvironment(EnvVars environment)
- Specified by:
forEnvironmentin interfaceEnvironmentSpecific<GitTool>
-
getDescriptor
public GitTool.DescriptorImpl getDescriptor()
- Specified by:
getDescriptorin interfaceDescribable<ToolInstallation>- Overrides:
getDescriptorin classAbstractDescribableImpl<ToolInstallation>
-
onLoaded
@Initializer(after=EXTENSIONS_AUGMENTED) public static void onLoaded()
-
-