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
A ToolInstaller that locates an existing tool on the agent, or fails.
  • Constructor Details

    • IsAlreadyOnPath

      @DataBoundConstructor public IsAlreadyOnPath(String label)
      Constructor that sets mandatory fields.
      Parameters:
      label - The ToolInstaller.getLabel().
  • Method Details

    • 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)
      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)
      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()
      Returns:
      getVersionCmd() as a multi-line string.
    • setVersionCmd

      public void setVersionCmd(String[] versionCmd)
      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 running getVersionCmd().
      Returns:
      The regex that was set, or null if not set to a valid value.
    • setVersionPattern

      public void setVersionPattern(Pattern versionPattern)
      Parameters:
      versionPattern - New value.
    • getVersionPatternString

      @CheckForNull public String getVersionPatternString()
      The regular expression used to parse the output from running getVersionCmd().
      Returns:
      The regex that was set, or null if not set.
    • setVersionPatternString

      @DataBoundSetter public void setVersionPatternString(String versionPatternString)
      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)
      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)
      Parameters:
      versionMax - New value.
    • performInstallation

      public FilePath performInstallation(@NonNull ToolInstallation tool, @NonNull Node node, @CheckForNull TaskListener log) throws IOException, InterruptedException
      Specified by:
      performInstallation in class ToolInstaller
      Throws:
      IOException
      InterruptedException