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
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor for theAuthenticatedZipExtractionInstaller.Nested classes/interfaces inherited from class hudson.tools.ToolInstaller
ToolInstaller.ToolInstallerEntry, ToolInstaller.ToolInstallerListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.tools.ToolInstaller
tool -
Constructor Summary
ConstructorsConstructorDescriptionConstructor that sets mandatory fields. -
Method Summary
Modifier and TypeMethodDescriptionprotected DatedownloadOnFromMaster(URI uri, Long timestampOfLocalContents, String usernameOrNull, String passwordOrNull, FilePath dir, TaskListener logOrNull, String nodeName) protected DatedownloadOnRemoteNode(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.booleanprotected com.cloudbees.plugins.credentials.common.StandardCredentialslookupConfiguredCredentials(String urlHostOrNullOrEmpty) performInstallation(ToolInstallation tool, Node node, TaskListener log) voidsetCredentialsId(String credentialsId) SetsgetCredentialsId().voidsetFallbackToExistingInstallation(boolean fallbackToExistingInstallation) voidSetsgetSubdir().voidSetsgetUrl().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:
performInstallationin classToolInstaller- Throws:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-