Package jenkins.plugins.nodejs.tools
Class NodeJSInstallation
java.lang.Object
hudson.model.AbstractDescribableImpl<ToolInstallation>
hudson.tools.ToolInstallation
jenkins.plugins.nodejs.tools.NodeJSInstallation
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstallation>
,EnvironmentSpecific<NodeJSInstallation>
,NodeSpecific<NodeJSInstallation>
,Serializable
public class NodeJSInstallation
extends ToolInstallation
implements EnvironmentSpecific<NodeJSInstallation>, NodeSpecific<NodeJSInstallation>
Information about JDK installation.
- Author:
- fcamblor, Nikolas Falco
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverter
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ModifierConstructorDescriptionNodeJSInstallation
(String name, String home, List<? extends ToolProperty<?>> properties) protected
NodeJSInstallation
(String name, String home, List<? extends ToolProperty<?>> properties, Platform platform) -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildEnvVars
(EnvVars env) forEnvironment
(EnvVars environment) forNode
(Node node, TaskListener log) getExecutable
(Launcher launcher) Gets the executable path of NodeJS on the given target system.Methods inherited from class hudson.tools.ToolInstallation
all, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
NodeJSInstallation
@DataBoundConstructor public NodeJSInstallation(@NonNull String name, @Nullable String home, List<? extends ToolProperty<?>> properties) -
NodeJSInstallation
protected NodeJSInstallation(@NonNull String name, @Nullable String home, List<? extends ToolProperty<?>> properties, Platform platform)
-
-
Method Details
-
forEnvironment
- Specified by:
forEnvironment
in interfaceEnvironmentSpecific<NodeJSInstallation>
-
forNode
public NodeJSInstallation forNode(@NonNull Node node, TaskListener log) throws IOException, InterruptedException - Specified by:
forNode
in interfaceNodeSpecific<NodeJSInstallation>
- Throws:
IOException
InterruptedException
-
buildEnvVars
- Overrides:
buildEnvVars
in classToolInstallation
-
getExecutable
Gets the executable path of NodeJS on the given target system.- Parameters:
launcher
- a way to start processes- Returns:
- the nodejs executable in the system is exists,
null
otherwise. - Throws:
InterruptedException
- if the step is interruptedIOException
- if something goes wrong
-