hudson.plugins.xshell
Class XShellBuilder

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

public final class XShellBuilder
extends hudson.tasks.Builder

XShell Builder Plugin.

Author:
Marco Ambu

Nested Class Summary
 
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 XShellDescriptor DESCRIPTOR
           
static String UNIX_SEP
           
static String WINDOWS_SEP
           
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
XShellBuilder(String commandLine, Boolean executeFromWorkingDir, String regexToKill, String timeAllocated)
           
 
Method Summary
static String convertEnvVarsToUnix(String cmdLine)
          Convert Windows-style environment variables to UNIX-style.
static String convertEnvVarsToWindows(String cmdLine)
          Convert UNIX-style environment variables to Windows-style.
static String convertSeparator(String cmdLine, String newSeparator)
           
 String getCommandLine()
           
 hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
           
 Boolean getExecuteFromWorkingDir()
           
 String getRegexToKill()
           
 String getTimeAllocated()
           
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener 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

UNIX_SEP

public static final String UNIX_SEP
See Also:
Constant Field Values

WINDOWS_SEP

public static final String WINDOWS_SEP
See Also:
Constant Field Values

DESCRIPTOR

@Extension
public static final XShellDescriptor DESCRIPTOR
Constructor Detail

XShellBuilder

@DataBoundConstructor
public XShellBuilder(String commandLine,
                                          Boolean executeFromWorkingDir,
                                          String regexToKill,
                                          String timeAllocated)
Method Detail

getCommandLine

public String getCommandLine()

getExecuteFromWorkingDir

public Boolean getExecuteFromWorkingDir()

getRegexToKill

public String getRegexToKill()

getTimeAllocated

public String getTimeAllocated()

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

perform

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

convertSeparator

public static String convertSeparator(String cmdLine,
                                      String newSeparator)

convertEnvVarsToUnix

public static String convertEnvVarsToUnix(String cmdLine)
Convert Windows-style environment variables to UNIX-style. E.g. "script --opt=%OPT%" to "script --opt=$OPT"

Parameters:
cmdLine - The command line with Windows-style env vars to convert.
Returns:
The command line with UNIX-style env vars.

convertEnvVarsToWindows

public static String convertEnvVarsToWindows(String cmdLine)
Convert UNIX-style environment variables to Windows-style. E.g. "script --opt=$OPT" to "script --opt=%OPT%"

Parameters:
cmdLine - The command line with Windows-style env vars to convert.
Returns:
The command line with UNIX-style env vars.


Copyright © 2004-2013. All Rights Reserved.