Class JobMatrix.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.workflows.JobMatrix.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobMatrixbuild()Builds the configured instance.JobMatrix.Builderdomain(Map<String,? extends List<? extends Object>> domain)Sets the value ofJobMatrix.getDomain()JobMatrix.Builderexclude(List<? extends Map<String,? extends Object>> exclude)Sets the value ofJobMatrix.getExclude()JobMatrix.Builderinclude(List<? extends Map<String,? extends Object>> include)Sets the value ofJobMatrix.getInclude()
-
-
-
Method Detail
-
domain
@Stability(Experimental) public JobMatrix.Builder domain(Map<String,? extends List<? extends Object>> domain)
Sets the value ofJobMatrix.getDomain()- Parameters:
domain- Each option you define in the matrix has a key and value. The keys you define become properties in the matrix context and you can reference the property in other areas of your workflow file. For example, if you define the key os that contains an array of operating systems, you can use the matrix.os property as the value of the runs-on keyword to create a job for each operating system.- Returns:
this
-
exclude
@Stability(Experimental) public JobMatrix.Builder exclude(List<? extends Map<String,? extends Object>> exclude)
Sets the value ofJobMatrix.getExclude()- Parameters:
exclude- You can remove a specific configurations defined in the build matrix using the exclude option. Using exclude removes a job defined by the build matrix.- Returns:
this
-
include
@Stability(Experimental) public JobMatrix.Builder include(List<? extends Map<String,? extends Object>> include)
Sets the value ofJobMatrix.getInclude()- Parameters:
include- You can add additional configuration options to a build matrix job that already exists. For example, if you want to use a specific version of npm when the job that uses windows-latest and version 8 of node runs, you can use include to specify that additional option.- Returns:
this
-
build
@Stability(Experimental) public JobMatrix build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<JobMatrix>- Returns:
- a new instance of
JobMatrix - Throws:
NullPointerException- if any required attribute was not provided
-
-