Class JobStrategy.Builder

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

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

      • Builder

        public Builder()
    • Method Detail

      • failFast

        @Stability(Experimental)
        public JobStrategy.Builder failFast​(Boolean failFast)
        Sets the value of JobStrategy.getFailFast()
        Parameters:
        failFast - When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true
        Returns:
        this
      • matrix

        @Stability(Experimental)
        public JobStrategy.Builder matrix​(JobMatrix matrix)
        Sets the value of JobStrategy.getMatrix()
        Parameters:
        matrix - You can define a matrix of different job configurations. A matrix allows you to create multiple jobs by performing variable substitution in a single job definition. For example, you can use a matrix to create jobs for more than one supported version of a programming language, operating system, or tool. A matrix reuses the job's configuration and creates a job for each matrix you configure.

        A job matrix can generate a maximum of 256 jobs per workflow run. This limit also applies to self-hosted runners.

        Returns:
        this
      • maxParallel

        @Stability(Experimental)
        public JobStrategy.Builder maxParallel​(Number maxParallel)
        Parameters:
        maxParallel - The maximum number of jobs that can run simultaneously when using a matrix job strategy. By default, GitHub will maximize the number of jobs run in parallel depending on the available runners on GitHub-hosted virtual machines.
        Returns:
        this
      • build

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