Class ScriptTask
java.lang.Object
com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<P>
com.atlassian.bamboo.specs.api.builders.task.Task<ScriptTask,ScriptTaskProperties>
com.atlassian.bamboo.specs.builders.task.ScriptTask
Represents a task that executes shell script.
-
Field Summary
Fields inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, requirements, taskEnabled
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets command line argument to be passed when script is executed.protected @NotNull ScriptTaskProperties
build()
environmentVariables
(@NotNull String environmentVariables) Sets environment variables to be set when script is executed.boolean
fileFromPath
(@NotNull String path) Sets the file path of script to execute.fileFromPath
(@NotNull Path path) Sets the file path of script to execute.int
hashCode()
inlineBody
(@NotNull String body) Sets body of the script to execute.inlineBodyFromPath
(@NotNull Path path) Sets body of the script to execute from a file.interpreter
(ScriptTaskProperties.Interpreter interpreter) Selects interpreter that will run the script.Specifies that script will be run by /bin/sh.Selects that script should be run by cmd.exe.Specifies that script will be run by an interpreter chosen based on the shebang line of the script.Specifies that script will be run by Windows PowerShell.location
(ScriptTaskProperties.Location location) Specifies the source of script to run.toString()
workingSubdirectory
(@NotNull String workingSubdirectory) Sets a directory the script should be executed in.Methods inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, enabled, requirements
-
Constructor Details
-
ScriptTask
public ScriptTask()
-
-
Method Details
-
location
Specifies the source of script to run. Possible options are:- INLINE
- task runs a script which is stored within this task's configuration
- SCRIPT
- task runs a script form an external file
-
interpreterShell
Specifies that script will be run by an interpreter chosen based on the shebang line of the script. -
interpreterWindowsPowerShell
Specifies that script will be run by Windows PowerShell. -
interpreterBinSh
Specifies that script will be run by /bin/sh. -
interpreterCmdExe
Selects that script should be run by cmd.exe. -
interpreter
Selects interpreter that will run the script. Possible choices are:- SHELL
- script will be run by an interpreter chosen based on the shebang line of the script
- WINDOWS_POWER_SHELL
- script will be run by Windows PowerShell
- BINSH_OR_CMDEXE
- script will be run by /bin/sh or cmd.exe, depending on the operating system
-
inlineBody
Sets body of the script to execute. Only valid whenScriptTaskProperties.Location.INLINE
script location is selected. -
inlineBodyFromPath
Sets body of the script to execute from a file. Only valid whenScriptTaskProperties.Location.INLINE
script location is selected.- Parameters:
path
- path to the file with the script text
-
fileFromPath
Sets the file path of script to execute. Only valid whenScriptTaskProperties.Location.FILE
script location is selected. -
fileFromPath
Sets the file path of script to execute. Only valid whenScriptTaskProperties.Location.FILE
script location is selected. -
argument
Sets command line argument to be passed when script is executed. -
environmentVariables
Sets environment variables to be set when script is executed. -
workingSubdirectory
Sets a directory the script should be executed in. -
build
- Specified by:
build
in classTask<ScriptTask,
ScriptTaskProperties>
-
equals
- Overrides:
equals
in classTask<ScriptTask,
ScriptTaskProperties>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTask<ScriptTask,
ScriptTaskProperties>
-
toString
- Overrides:
toString
in classTask<ScriptTask,
ScriptTaskProperties>
-