Class Job.Builder

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

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

      • Builder

        public Builder()
    • Method Detail

      • identifier

        @Stability(Experimental)
        public Job.Builder identifier​(String identifier)
        Sets the value of Job.getIdentifier()
        Parameters:
        identifier - name of dynamic key *. This parameter is required.
        Returns:
        this
      • docker

        @Stability(Experimental)
        public Job.Builder docker​(List<? extends Docker> docker)
        Sets the value of Job.getDocker()
        Parameters:
        docker - the value to be set.
        Returns:
        this
      • environment

        @Stability(Experimental)
        public Job.Builder environment​(Map<String,​? extends Object> environment)
        Sets the value of Job.getEnvironment()
        Parameters:
        environment - A map of environment variable names and values.
        Returns:
        this
      • machine

        @Stability(Experimental)
        public Job.Builder machine​(Machine machine)
        Sets the value of Job.getMachine()
        Parameters:
        machine - the value to be set.
        Returns:
        this
      • macos

        @Stability(Experimental)
        public Job.Builder macos​(Macos macos)
        Sets the value of Job.getMacos()
        Parameters:
        macos - the value to be set.
        Returns:
        this
      • parallelism

        @Stability(Experimental)
        public Job.Builder parallelism​(Number parallelism)
        Sets the value of Job.getParallelism()
        Parameters:
        parallelism - Number of parallel instances of this job to run (default: 1).
        Returns:
        this
      • shell

        @Stability(Experimental)
        public Job.Builder shell​(String shell)
        Sets the value of Job.getShell()
        Parameters:
        shell - Shell to use for execution command in all steps. Can be overridden by shell in each step
        Returns:
        this
      • steps

        @Stability(Experimental)
        public Job.Builder steps​(List<? extends Object> steps)
        Sets the value of Job.getSteps()
        Parameters:
        steps - no type support here, for syntax {@see https://circleci.com/docs/2.0/configuration-reference/#steps}.
        Returns:
        this
      • workingDirectory

        @Stability(Experimental)
        public Job.Builder workingDirectory​(String workingDirectory)
        Sets the value of Job.getWorkingDirectory()
        Parameters:
        workingDirectory - In which directory to run the steps. Will be interpreted as an absolute path. Default: ~/project
        Returns:
        this
      • build

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