Package jenkins.plugins.nodejs.tools
Class NodeJSInstaller
java.lang.Object
hudson.tools.ToolInstaller
hudson.tools.DownloadFromUrlInstaller
jenkins.plugins.nodejs.tools.NodeJSInstaller
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstaller>
- Direct Known Subclasses:
MirrorNodeJSInstaller
Automatic NodeJS installer from nodejs.org
- Since:
- 0.2
- Author:
- Frédéric Camblor, Nikolas Falco
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
protected final class
Nested classes/interfaces inherited from class hudson.tools.DownloadFromUrlInstaller
DownloadFromUrlInstaller.Installable, DownloadFromUrlInstaller.InstallableList, DownloadFromUrlInstaller.NodeSpecificInstallable
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
Modifier and TypeFieldDescriptionstatic final int
Define the elapse time before perform a new npm install for defined global packages.static final String
Fields inherited from class hudson.tools.DownloadFromUrlInstaller
id
Fields inherited from class hudson.tools.ToolInstaller
tool
-
Constructor Summary
ConstructorDescriptionNodeJSInstaller
(String id, String npmPackages, long npmPackagesRefreshHours) NodeJSInstaller
(String id, String npmPackages, long npmPackagesRefreshHours, boolean force32bit) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areNpmPackagesUpToDate
(FilePath expected, String npmPackages, long npmPackagesRefreshHours) protected File
getLocalCacheFile
(DownloadFromUrlInstaller.Installable installable, Node node) boolean
performInstallation
(ToolInstallation tool, Node node, TaskListener log) protected void
refreshGlobalPackages
(Node node, TaskListener log, FilePath expected) void
setForce32Bit
(boolean force32Bit) Methods inherited from class hudson.tools.DownloadFromUrlInstaller
findPullUpDirectory, isUpToDate
Methods inherited from class hudson.tools.ToolInstaller
appliesTo, getDescriptor, getLabel, preferredLocation, setTool
-
Field Details
-
NPM_PACKAGES_RECORD_FILENAME
- See Also:
-
DEFAULT_NPM_PACKAGES_REFRESH_HOURS
public static final int DEFAULT_NPM_PACKAGES_REFRESH_HOURSDefine the elapse time before perform a new npm install for defined global packages.- See Also:
-
-
Constructor Details
-
NodeJSInstaller
-
NodeJSInstaller
-
-
Method Details
-
getInstallable
- Overrides:
getInstallable
in classDownloadFromUrlInstaller
- Throws:
IOException
-
performInstallation
public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException - Overrides:
performInstallation
in classDownloadFromUrlInstaller
- Throws:
IOException
InterruptedException
-
refreshGlobalPackages
protected void refreshGlobalPackages(Node node, TaskListener log, FilePath expected) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
areNpmPackagesUpToDate
public static boolean areNpmPackagesUpToDate(FilePath expected, String npmPackages, long npmPackagesRefreshHours) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
getNpmPackages
-
getNpmPackagesRefreshHours
-
isForce32Bit
public boolean isForce32Bit() -
setForce32Bit
@DataBoundSetter public void setForce32Bit(boolean force32Bit) -
getLocalCacheFile
protected File getLocalCacheFile(DownloadFromUrlInstaller.Installable installable, Node node) throws DetectionFailedException - Throws:
DetectionFailedException
-