Class IsAlreadyOnPath
- java.lang.Object
-
- hudson.tools.ToolInstaller
-
- io.jenkins.plugins.extratoolinstallers.installers.IsAlreadyOnPath
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstaller>
public class IsAlreadyOnPath extends ToolInstaller
AToolInstaller
that locates an existing tool on the agent, or fails.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IsAlreadyOnPath.DescriptorImpl
Descriptor forIsAlreadyOnPath
.-
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
Constructors Constructor Description IsAlreadyOnPath(String label)
Constructor that sets mandatory fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExecutableName()
Name of the executable we are to locate.String
getRelativePath()
Directory of the tool's "home", relative to wherever we found the command on the path.String[]
getVersionCmd()
Command we run in order to test what version we've got.String
getVersionCmdString()
SeegetVersionCmd()
.String
getVersionMax()
The maximum version acceptable.String
getVersionMin()
The minimum version acceptable.Pattern
getVersionPattern()
The regular expression used to parse the output from runninggetVersionCmd()
.String
getVersionPatternString()
The regular expression used to parse the output from runninggetVersionCmd()
.FilePath
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 Detail
-
IsAlreadyOnPath
@DataBoundConstructor public IsAlreadyOnPath(String label)
Constructor that sets mandatory fields.- Parameters:
label
- TheToolInstaller.getLabel()
.
-
-
Method Detail
-
getExecutableName
@CheckForNull public String getExecutableName()
Name of the executable we are to locate.- Returns:
- Name, or null if none has been set.
-
setExecutableName
@DataBoundSetter public void setExecutableName(@Nullable String executable)
SetsgetExecutableName()
.- Parameters:
executable
- New value.
-
getRelativePath
@CheckForNull public String 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
@DataBoundSetter public void setRelativePath(@Nullable String relativePath)
SetsgetRelativePath()
.- Parameters:
relativePath
- New value.
-
getVersionCmd
@CheckForNull public String[] 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
@NonNull public String getVersionCmdString()
SeegetVersionCmd()
.- Returns:
getVersionCmd()
as a multi-line string.
-
setVersionCmd
public void setVersionCmd(String[] versionCmd)
SetsgetVersionCmd()
.- Parameters:
versionCmd
- New value.
-
setVersionCmdString
@DataBoundSetter public void setVersionCmdString(String versionCmdString)
- Parameters:
versionCmdString
- New value as multi-line string.
-
getVersionPattern
public Pattern 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
public void setVersionPattern(Pattern versionPattern)
SetsgetVersionPatternString()
andgetVersionPattern()
.- Parameters:
versionPattern
- New value.
-
getVersionPatternString
@CheckForNull public String getVersionPatternString()
The regular expression used to parse the output from runninggetVersionCmd()
.- Returns:
- The regex that was set, or null if not set.
-
setVersionPatternString
@DataBoundSetter public void setVersionPatternString(String versionPatternString)
SetsgetVersionPatternString()
andgetVersionPattern()
.- Parameters:
versionPatternString
- New value.
-
getVersionMin
@CheckForNull public String getVersionMin()
The minimum version acceptable.- Returns:
- The version that was set, or null if not set.
-
setVersionMin
@DataBoundSetter public void setVersionMin(String versionMin)
SetsgetVersionMin()
.- Parameters:
versionMin
- New value.
-
getVersionMax
@CheckForNull public String getVersionMax()
The maximum version acceptable.- Returns:
- The version that was set, or null if not set.
-
setVersionMax
@DataBoundSetter public void setVersionMax(String versionMax)
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
-
-