Class AnyOfInstaller
- java.lang.Object
-
- hudson.tools.ToolInstaller
-
- io.jenkins.plugins.extratoolinstallers.installers.AnyOfInstaller
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstaller>
public class AnyOfInstaller extends ToolInstaller
Installs tools using "any of" the installation methods provided. The installation is deemed a success upon any success, ignoring any earlier failures.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnyOfInstaller.DescriptorImpl
Descriptor for theAnyOfInstaller
.-
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 AnyOfInstaller()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(Node node)
int
getAttemptsOfWholeList()
The number of times we will attempt each installer before moving onto the next in the list.int
getAttemptsPerInstaller()
The number of times we will attempt each installer before moving onto the next in the list.InstallSourceProperty
getInstallers()
The list of installers we will attempt.FilePath
performInstallation(ToolInstallation tool, Node node, TaskListener log)
void
setAttemptsOfWholeList(int attemptsOfWholeList)
SetsgetAttemptsOfWholeList()
.void
setAttemptsPerInstaller(int attemptsPerInstaller)
void
setInstallers(InstallSourceProperty installers)
SetsgetInstallers()
.protected void
setTool(ToolInstallation t)
-
Methods inherited from class hudson.tools.ToolInstaller
getDescriptor, getLabel, preferredLocation
-
-
-
-
Method Detail
-
getInstallers
@CheckForNull public InstallSourceProperty getInstallers()
The list of installers we will attempt. Cannot be empty for this installer to be valid.- Returns:
- Our installers.
-
setInstallers
@DataBoundSetter public void setInstallers(@Nullable InstallSourceProperty installers)
SetsgetInstallers()
.- Parameters:
installers
- The new value.
-
getAttemptsPerInstaller
public int getAttemptsPerInstaller()
The number of times we will attempt each installer before moving onto the next in the list. Will always be one or more.- Returns:
- The value set by
setAttemptsPerInstaller(int)
if that was 1 or more, else 1.
-
setAttemptsPerInstaller
@DataBoundSetter public void setAttemptsPerInstaller(int attemptsPerInstaller)
- Parameters:
attemptsPerInstaller
- The new value.
-
getAttemptsOfWholeList
public int getAttemptsOfWholeList()
The number of times we will attempt each installer before moving onto the next in the list. Will always return one or more.- Returns:
- The value set by
setAttemptsOfWholeList(int)
if that was 1 or more, else 1.
-
setAttemptsOfWholeList
@DataBoundSetter public void setAttemptsOfWholeList(int attemptsOfWholeList)
SetsgetAttemptsOfWholeList()
.- Parameters:
attemptsOfWholeList
- The new value.
-
setTool
protected void setTool(ToolInstallation t)
- Overrides:
setTool
in classToolInstaller
-
appliesTo
public boolean appliesTo(Node node)
- Overrides:
appliesTo
in classToolInstaller
-
performInstallation
public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException
- Specified by:
performInstallation
in classToolInstaller
- Throws:
IOException
InterruptedException
-
-