Package hudson.plugins.powershell
Class PowerShell
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- hudson.tasks.CommandInterpreter
-
- hudson.plugins.powershell.PowerShell
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,EnvVarsFilterableBuilder
public class PowerShell extends CommandInterpreter
Invokes PowerShell from Jenkins.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PowerShell.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.tasks.CommandInterpreter
command, configuredLocalRules
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description PowerShell(String command, boolean stopOnError, boolean useProfile, Integer unstableReturn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
buildCommandLine(FilePath script)
protected String
getContents()
protected String
getFileExtension()
Integer
getUnstableReturn()
protected boolean
isErrorlevelForUnstableBuild(int exitCode)
boolean
isStopOnError()
boolean
isUseProfile()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
void
setUnstableReturn(Integer unstableReturn)
-
Methods inherited from class hudson.tasks.CommandInterpreter
buildEnvVarsFilterRules, createScriptFile, getCommand, getConfiguredLocalRules, join, perform
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Method Detail
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classCommandInterpreter
- Throws:
InterruptedException
-
isStopOnError
public boolean isStopOnError()
-
isUseProfile
public boolean isUseProfile()
-
getFileExtension
protected String getFileExtension()
- Specified by:
getFileExtension
in classCommandInterpreter
-
getUnstableReturn
@CheckForNull public final Integer getUnstableReturn()
-
setUnstableReturn
@DataBoundSetter public void setUnstableReturn(Integer unstableReturn)
-
isErrorlevelForUnstableBuild
protected boolean isErrorlevelForUnstableBuild(int exitCode)
- Overrides:
isErrorlevelForUnstableBuild
in classCommandInterpreter
-
buildCommandLine
public String[] buildCommandLine(FilePath script)
- Specified by:
buildCommandLine
in classCommandInterpreter
-
getContents
protected String getContents()
- Specified by:
getContents
in classCommandInterpreter
-
-