Class TaskSpec.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<TaskSpec>
    Enclosing interface:
    TaskSpec

    @Stability(Experimental)
    public static final class TaskSpec.Builder
    extends Object
    implements software.amazon.jsii.Builder<TaskSpec>
    A builder for TaskSpec
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • condition

        @Stability(Experimental)
        public TaskSpec.Builder condition​(String condition)
        Parameters:
        condition - A shell command which determines if the this task should be executed. If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.
        Returns:
        this
      • env

        @Stability(Experimental)
        public TaskSpec.Builder env​(Map<String,​String> env)
        Sets the value of TaskCommonOptions.getEnv()
        Parameters:
        env - Defines environment variables for the execution of this task. Values in this map will be evaluated in a shell, so you can do stuff like $(echo "foo").
        Returns:
        this
      • requiredEnv

        @Stability(Experimental)
        public TaskSpec.Builder requiredEnv​(List<String> requiredEnv)
        Parameters:
        requiredEnv - A set of environment variables that must be defined in order to execute this task. Task execution will fail if one of these is not defined.
        Returns:
        this
      • build

        @Stability(Experimental)
        public TaskSpec build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<TaskSpec>
        Returns:
        a new instance of TaskSpec
        Throws:
        NullPointerException - if any required attribute was not provided