Package hudson.tasks
Class BatchFile
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- hudson.tasks.CommandInterpreter
-
- hudson.tasks.BatchFile
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,EnvVarsFilterableBuilder
public class BatchFile extends CommandInterpreter
Executes commands by using Windows batch file.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BatchFile.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
-
-
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)
Determines whether a non-zero exit code from the process should change the build status toResult.UNSTABLE
instead of defaultResult.FAILURE
.void
setConfiguredLocalRules(List<EnvVarsFilterLocalRule> configuredLocalRules)
Set local environment variable filter rulesvoid
setUnstableReturn(Integer unstableReturn)
-
Methods inherited from class hudson.tasks.CommandInterpreter
buildEnvVarsFilterRules, createScriptFile, getCommand, getConfiguredLocalRules, join, perform, perform
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Constructor Detail
-
BatchFile
@DataBoundConstructor public BatchFile(String command)
-
-
Method Detail
-
setConfiguredLocalRules
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) @DataBoundSetter public void setConfiguredLocalRules(List<EnvVarsFilterLocalRule> configuredLocalRules)
Set local environment variable filter rules- Parameters:
configuredLocalRules
- list of local environment filter rules- Since:
- 2.246
-
buildCommandLine
public String[] buildCommandLine(FilePath script)
- Specified by:
buildCommandLine
in classCommandInterpreter
-
getContents
protected String getContents()
- Specified by:
getContents
in classCommandInterpreter
-
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)
Description copied from class:CommandInterpreter
Determines whether a non-zero exit code from the process should change the build status toResult.UNSTABLE
instead of defaultResult.FAILURE
. Changing toResult.UNSTABLE
does not abort the build, next steps are continued.- Overrides:
isErrorlevelForUnstableBuild
in classCommandInterpreter
-
-