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 class
GitTool.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 GitTool
forEnvironment(EnvVars environment)
GitTool
forNode(Node node, TaskListener log)
static GitTool
getDefaultInstallation()
Returns the default installation.GitTool.DescriptorImpl
getDescriptor()
String
getGitExe()
getGitExe.static void
onLoaded()
-
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
-List
of properties for this tool
-
-
Method Detail
-
getGitExe
public String getGitExe()
getGitExe.- Returns:
String
that 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:
forNode
in interfaceNodeSpecific<GitTool>
- Throws:
IOException
InterruptedException
-
forEnvironment
public GitTool forEnvironment(EnvVars environment)
- Specified by:
forEnvironment
in interfaceEnvironmentSpecific<GitTool>
-
getDescriptor
public GitTool.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<ToolInstallation>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ToolInstallation>
-
onLoaded
@Initializer(after=EXTENSIONS_AUGMENTED) public static void onLoaded()
-
-