Interface TaskStepOptions
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
TaskStep
- All Known Implementing Classes:
TaskStep.Jsii$Proxy,TaskStepOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:42.811Z") @Stability(Experimental) public interface TaskStepOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Options for task steps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTaskStepOptions.BuilderA builder forTaskStepOptionsstatic classTaskStepOptions.Jsii$ProxyAn implementation forTaskStepOptions
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static TaskStepOptions.Builderbuilder()default List<String>getArgs()(experimental) A list of fixed arguments always passed to the step.default StringgetCondition()(experimental) A shell command which determines if the this step should be executed.default StringgetCwd()(experimental) The working directory for this step.default Map<String,String>getEnv()(experimental) Defines environment variables for the execution of this step (execandbuiltinonly).default StringgetName()(experimental) Step name.default BooleangetReceiveArgs()(experimental) Should this step receive args passed to the task.
-
-
-
Method Detail
-
getArgs
@Stability(Experimental) @Nullable default List<String> getArgs()
(experimental) A list of fixed arguments always passed to the step.Useful to re-use existing tasks without having to re-define the whole task.\ Fixed args are always passed to the step, even if
receiveArgsisfalseand are always passed before any args the task is called with.If the step executes a shell commands, args are passed through at the end of the
execshell command.\ The position of the args can be changed by including the marker$@inside the command string.If the step spawns a subtask, args are passed to the subtask. The subtask must define steps receiving args for this to have any effect.
If the step calls a builtin script, args are passed to the script. It is up to the script to use or discard the arguments.
Default: - no arguments are passed to the step
Example:
task.spawn("deploy", { args: ["--force"] });
-
getCondition
@Stability(Experimental) @Nullable default String getCondition()
(experimental) A shell command which determines if the this step should be executed.If the program exits with a zero exit code, the step will be executed. A non-zero code means the step will be skipped (subsequent task steps will still be evaluated/executed).
-
getCwd
@Stability(Experimental) @Nullable default String getCwd()
(experimental) The working directory for this step.Default: - determined by the task
-
getEnv
@Stability(Experimental) @Nullable default Map<String,String> getEnv()
(experimental) Defines environment variables for the execution of this step (execandbuiltinonly).Values in this map can be simple, literal values or shell expressions that will be evaluated at runtime e.g.
$(echo "foo").Default: - no environment variables defined in step
Example:
{ "foo": "bar", "boo": "$(echo baz)" }
-
getName
@Stability(Experimental) @Nullable default String getName()
(experimental) Step name.Default: - no name
-
getReceiveArgs
@Stability(Experimental) @Nullable default Boolean getReceiveArgs()
(experimental) Should this step receive args passed to the task.If
true, args are passed through at the end of theexecshell command.\ The position of the args can be changed by including the marker$@inside the command string.If the step spawns a subtask, args are passed to the subtask. The subtask must define steps receiving args for this to have any effect.
Default: false
Example:
task.exec("echo Hello $@ World!", { receiveArgs: true });
-
builder
@Stability(Experimental) static TaskStepOptions.Builder builder()
- Returns:
- a
TaskStepOptions.BuilderofTaskStepOptions
-
-