jenkins.plugins.nodejs
Class NodeJsCommandInterpreter

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by jenkins.plugins.nodejs.NodeJsCommandInterpreter
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep

public class NodeJsCommandInterpreter
extends hudson.tasks.Builder

This class executes a JavaScript file using node. The file should contain NodeJS script specified in the job configuration.

Author:
cliffano

Nested Class Summary
static class NodeJsCommandInterpreter.NodeJsDescriptor
          Provides builder details for the job configuration page.
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static NodeJsCommandInterpreter.NodeJsDescriptor DESCRIPTOR
           
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
NodeJsCommandInterpreter(String command, String nodeJSInstallationName)
          Constructs a NodeJsCommandInterpreter with specified command.
 
Method Summary
 hudson.FilePath createScriptFile(hudson.FilePath dir)
          Creates a script file in a temporary name in the specified directory.
 String getCommand()
           
 hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
           
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener)
           
 
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Field Detail

DESCRIPTOR

@Extension
public static final NodeJsCommandInterpreter.NodeJsDescriptor DESCRIPTOR
Constructor Detail

NodeJsCommandInterpreter

@DataBoundConstructor
public NodeJsCommandInterpreter(String command,
                                                     String nodeJSInstallationName)
Constructs a NodeJsCommandInterpreter with specified command.

Parameters:
command - the NodeJS script
Method Detail

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws InterruptedException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
InterruptedException

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.TaskListener listener)
                throws InterruptedException
Throws:
InterruptedException

createScriptFile

public hudson.FilePath createScriptFile(@Nonnull
                                        hudson.FilePath dir)
                                 throws IOException,
                                        InterruptedException
Creates a script file in a temporary name in the specified directory.

Throws:
IOException
InterruptedException

getCommand

public String getCommand()

getDescriptor

public hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>
Overrides:
getDescriptor in class hudson.tasks.Builder
Returns:
the descriptor


Copyright © 2004-2013. All Rights Reserved.