Class AuthenticatedZipExtractionInstaller
java.lang.Object
hudson.tools.ToolInstaller
io.jenkins.plugins.extratoolinstallers.installers.AuthenticatedZipExtractionInstaller
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstaller>
A
ToolInstaller
that downloads a zip or tar.gz and unpacks it in
order to install a tool. If the tool is already present, it will only be
re-downloaded/re-unpacked if the URL is newer than the existing content. The
download supports HTTP basic authentication.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Descriptor for theAuthenticatedZipExtractionInstaller
.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
ConstructorDescriptionConstructor that sets mandatory fields. -
Method Summary
Modifier and TypeMethodDescriptionprotected Date
downloadOnFromMaster
(URI uri, Long timestampOfLocalContents, String usernameOrNull, String passwordOrNull, FilePath dir, TaskListener logOrNull, String nodeName) protected Date
downloadOnRemoteNode
(URI uri, Long timestampOfLocalContents, String usernameOrNull, String passwordOrNull, FilePath dir, TaskListener logOrNull, String nodeName) ID of the credentials to use when doing the download.Subdirectory within the zip/tar.gz where the tool's binaries are located.getUrl()
URL of a zip/tar.gz file which should be downloaded and unpacked if the tool is missing or out of date.boolean
protected com.cloudbees.plugins.credentials.common.StandardCredentials
lookupConfiguredCredentials
(String urlHostOrNullOrEmpty) performInstallation
(ToolInstallation tool, Node node, TaskListener log) void
setCredentialsId
(String credentialsId) SetsgetCredentialsId()
.void
setFallbackToExistingInstallation
(boolean fallbackToExistingInstallation) void
SetsgetSubdir()
.void
SetsgetUrl()
.Methods inherited from class hudson.tools.ToolInstaller
appliesTo, getDescriptor, getLabel, preferredLocation, setTool
-
Constructor Details
-
AuthenticatedZipExtractionInstaller
Constructor that sets mandatory fields.- Parameters:
label
- TheToolInstaller.getLabel()
.
-
-
Method Details
-
getUrl
URL of a zip/tar.gz file which should be downloaded and unpacked if the tool is missing or out of date.- Returns:
- URL, or null if none has been set.
-
setUrl
SetsgetUrl()
.- Parameters:
url
- New value.
-
getCredentialsId
ID of the credentials to use when doing the download.- Returns:
- The credentials ID, or null if none has been set.
-
setCredentialsId
SetsgetCredentialsId()
.- Parameters:
credentialsId
- New value.
-
getSubdir
Subdirectory within the zip/tar.gz where the tool's binaries are located. It is this folder that's added to the path (etc). Can be null/empty if the binaries are at the base of the zip/tar.gz.- Returns:
- The subdirectory, or null if no subdirectory has been set.
-
setSubdir
SetsgetSubdir()
.- Parameters:
subdir
- New value.
-
isFallbackToExistingInstallation
public boolean isFallbackToExistingInstallation() -
setFallbackToExistingInstallation
@DataBoundSetter public void setFallbackToExistingInstallation(boolean fallbackToExistingInstallation) -
performInstallation
public FilePath performInstallation(@NonNull ToolInstallation tool, @NonNull Node node, @CheckForNull TaskListener log) throws IOException, InterruptedException - Specified by:
performInstallation
in classToolInstaller
- Throws:
IOException
InterruptedException
-
lookupConfiguredCredentials
protected com.cloudbees.plugins.credentials.common.StandardCredentials lookupConfiguredCredentials(@CheckForNull String urlHostOrNullOrEmpty) throws ExtraToolInstallersException - Throws:
ExtraToolInstallersException
-
downloadOnFromMaster
protected Date downloadOnFromMaster(@NonNull URI uri, @CheckForNull Long timestampOfLocalContents, @CheckForNull String usernameOrNull, @CheckForNull String passwordOrNull, @NonNull FilePath dir, @CheckForNull TaskListener logOrNull, @NonNull String nodeName) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
downloadOnRemoteNode
protected Date downloadOnRemoteNode(@NonNull URI uri, @CheckForNull Long timestampOfLocalContents, @CheckForNull String usernameOrNull, @CheckForNull String passwordOrNull, @NonNull FilePath dir, @CheckForNull TaskListener logOrNull, @NonNull String nodeName) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-