Class IsAlreadyOnPath
java.lang.Object
hudson.tools.ToolInstaller
io.jenkins.plugins.extratoolinstallers.installers.IsAlreadyOnPath
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstaller>
A
ToolInstaller
that locates an existing tool on the agent, or fails.-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.tools.ToolInstaller
ToolInstaller.ToolInstallerEntry, ToolInstaller.ToolInstallerList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.tools.ToolInstaller
tool
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionName of the executable we are to locate.Directory of the tool's "home", relative to wherever we found the command on the path.String[]
Command we run in order to test what version we've got.SeegetVersionCmd()
.The maximum version acceptable.The minimum version acceptable.The regular expression used to parse the output from runninggetVersionCmd()
.The regular expression used to parse the output from runninggetVersionCmd()
.performInstallation
(ToolInstallation tool, Node node, TaskListener log) void
setExecutableName
(String executable) SetsgetExecutableName()
.void
setRelativePath
(String relativePath) SetsgetRelativePath()
.void
setVersionCmd
(String[] versionCmd) SetsgetVersionCmd()
.void
setVersionCmdString
(String versionCmdString) void
setVersionMax
(String versionMax) SetsgetVersionMax()
.void
setVersionMin
(String versionMin) SetsgetVersionMin()
.void
setVersionPattern
(Pattern versionPattern) SetsgetVersionPatternString()
andgetVersionPattern()
.void
setVersionPatternString
(String versionPatternString) SetsgetVersionPatternString()
andgetVersionPattern()
.Methods inherited from class hudson.tools.ToolInstaller
appliesTo, getDescriptor, getLabel, preferredLocation, setTool
-
Constructor Details
-
IsAlreadyOnPath
Constructor that sets mandatory fields.- Parameters:
label
- TheToolInstaller.getLabel()
.
-
-
Method Details
-
getExecutableName
Name of the executable we are to locate.- Returns:
- Name, or null if none has been set.
-
setExecutableName
SetsgetExecutableName()
.- Parameters:
executable
- New value.
-
getRelativePath
Directory of the tool's "home", relative to wherever we found the command on the path.- Returns:
- The relative path, or null if none has been set (which means ".").
-
setRelativePath
SetsgetRelativePath()
.- Parameters:
relativePath
- New value.
-
getVersionCmd
Command we run in order to test what version we've got.- Returns:
- null if not set, else a list where the first element is the command and the remaining elements are arguments for the command.
-
getVersionCmdString
SeegetVersionCmd()
.- Returns:
getVersionCmd()
as a multi-line string.
-
setVersionCmd
SetsgetVersionCmd()
.- Parameters:
versionCmd
- New value.
-
setVersionCmdString
- Parameters:
versionCmdString
- New value as multi-line string.
-
getVersionPattern
The regular expression used to parse the output from runninggetVersionCmd()
.- Returns:
- The regex that was set, or null if not set to a valid value.
-
setVersionPattern
SetsgetVersionPatternString()
andgetVersionPattern()
.- Parameters:
versionPattern
- New value.
-
getVersionPatternString
The regular expression used to parse the output from runninggetVersionCmd()
.- Returns:
- The regex that was set, or null if not set.
-
setVersionPatternString
SetsgetVersionPatternString()
andgetVersionPattern()
.- Parameters:
versionPatternString
- New value.
-
getVersionMin
The minimum version acceptable.- Returns:
- The version that was set, or null if not set.
-
setVersionMin
SetsgetVersionMin()
.- Parameters:
versionMin
- New value.
-
getVersionMax
The maximum version acceptable.- Returns:
- The version that was set, or null if not set.
-
setVersionMax
SetsgetVersionMax()
.- Parameters:
versionMax
- New value.
-
performInstallation
public FilePath performInstallation(@NonNull ToolInstallation tool, @NonNull Node node, @CheckForNull TaskListener log) throws IOException, InterruptedException - Specified by:
performInstallation
in classToolInstaller
- Throws:
IOException
InterruptedException
-