Class TaskStepOptions.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • args

        @Stability(Experimental)
        public TaskStepOptions.Builder args​(List<String> args)
        Sets the value of TaskStepOptions.getArgs()
        Parameters:
        args - 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 receiveArgs is false and 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 exec shell 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.

        Returns:
        this
      • condition

        @Stability(Experimental)
        public TaskStepOptions.Builder condition​(String condition)
        Parameters:
        condition - 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).
        Returns:
        this
      • env

        @Stability(Experimental)
        public TaskStepOptions.Builder env​(Map<String,​String> env)
        Sets the value of TaskStepOptions.getEnv()
        Parameters:
        env - Defines environment variables for the execution of this step (exec and builtin only). Values in this map can be simple, literal values or shell expressions that will be evaluated at runtime e.g. $(echo "foo").
        Returns:
        this
      • receiveArgs

        @Stability(Experimental)
        public TaskStepOptions.Builder receiveArgs​(Boolean receiveArgs)
        Parameters:
        receiveArgs - Should this step receive args passed to the task. If true, args are passed through at the end of the exec shell 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.

        Returns:
        this