Package io.github.cdklabs.projen.github
Class TaskWorkflowOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.TaskWorkflowOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TaskWorkflowOptions>
- Enclosing interface:
- TaskWorkflowOptions
@Stability(Experimental) public static final class TaskWorkflowOptions.Builder extends Object implements software.amazon.jsii.Builder<TaskWorkflowOptions>
A builder forTaskWorkflowOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Experimental) public TaskWorkflowOptions.Builder name(String name)
Sets the value ofTaskWorkflowOptions.getName()- Parameters:
name- The workflow name. This parameter is required.- Returns:
this
-
task
@Stability(Experimental) public TaskWorkflowOptions.Builder task(Task task)
Sets the value ofTaskWorkflowOptions.getTask()- Parameters:
task- The main task to be executed. This parameter is required.- Returns:
this
-
jobId
@Stability(Experimental) public TaskWorkflowOptions.Builder jobId(String jobId)
Sets the value ofTaskWorkflowOptions.getJobId()- Parameters:
jobId- The primary job id.- Returns:
this
-
triggers
@Stability(Experimental) public TaskWorkflowOptions.Builder triggers(Triggers triggers)
Sets the value ofTaskWorkflowOptions.getTriggers()- Parameters:
triggers- The triggers for the workflow.- Returns:
this
-
permissions
@Stability(Experimental) public TaskWorkflowOptions.Builder permissions(JobPermissions permissions)
Sets the value ofTaskWorkflowJobOptions.getPermissions()- Parameters:
permissions- Permissions for the build job. This parameter is required.- Returns:
this
-
artifactsDirectory
@Stability(Experimental) public TaskWorkflowOptions.Builder artifactsDirectory(String artifactsDirectory)
Sets the value ofTaskWorkflowJobOptions.getArtifactsDirectory()- Parameters:
artifactsDirectory- A directory name which contains artifacts to be uploaded (e.g.dist). If this is set, the contents of this directory will be uploaded as an artifact at the end of the workflow run, even if other steps fail.- Returns:
this
-
checkoutWith
@Stability(Experimental) public TaskWorkflowOptions.Builder checkoutWith(CheckoutWith checkoutWith)
Sets the value ofTaskWorkflowJobOptions.getCheckoutWith()- Parameters:
checkoutWith- Override for thewithproperty of the source code checkout step.- Returns:
this
-
condition
@Stability(Experimental) public TaskWorkflowOptions.Builder condition(String condition)
Sets the value ofTaskWorkflowJobOptions.getCondition()- Parameters:
condition- Adds an 'if' condition to the workflow.- Returns:
this
-
container
@Stability(Experimental) public TaskWorkflowOptions.Builder container(ContainerOptions container)
Sets the value ofTaskWorkflowJobOptions.getContainer()- Parameters:
container- the value to be set.- Returns:
this
-
downloadLfs
@Stability(Experimental) public TaskWorkflowOptions.Builder downloadLfs(Boolean downloadLfs)
Sets the value ofTaskWorkflowJobOptions.getDownloadLfs()- Parameters:
downloadLfs- Whether to download files from Git LFS for this workflow.- Returns:
this
-
env
@Stability(Experimental) public TaskWorkflowOptions.Builder env(Map<String,String> env)
Sets the value ofTaskWorkflowJobOptions.getEnv()- Parameters:
env- Workflow environment variables.- Returns:
this
-
gitIdentity
@Stability(Experimental) public TaskWorkflowOptions.Builder gitIdentity(GitIdentity gitIdentity)
Sets the value ofTaskWorkflowJobOptions.getGitIdentity()- Parameters:
gitIdentity- The git identity to use in this workflow.- Returns:
this
-
jobDefaults
@Stability(Experimental) public TaskWorkflowOptions.Builder jobDefaults(JobDefaults jobDefaults)
Sets the value ofTaskWorkflowJobOptions.getJobDefaults()- Parameters:
jobDefaults- Default settings for all steps in the TaskWorkflow Job.- Returns:
this
-
outputs
@Stability(Experimental) public TaskWorkflowOptions.Builder outputs(Map<String,? extends JobStepOutput> outputs)
Sets the value ofTaskWorkflowJobOptions.getOutputs()- Parameters:
outputs- Mapping of job output names to values/expressions.- Returns:
this
-
postBuildSteps
@Stability(Experimental) public TaskWorkflowOptions.Builder postBuildSteps(List<? extends JobStep> postBuildSteps)
Sets the value ofTaskWorkflowJobOptions.getPostBuildSteps()- Parameters:
postBuildSteps- Actions to run after the main build step.- Returns:
this
-
preBuildSteps
@Stability(Experimental) public TaskWorkflowOptions.Builder preBuildSteps(List<? extends JobStep> preBuildSteps)
Sets the value ofTaskWorkflowJobOptions.getPreBuildSteps()- Parameters:
preBuildSteps- Steps to run before the main build step.- Returns:
this
-
preCheckoutSteps
@Stability(Experimental) public TaskWorkflowOptions.Builder preCheckoutSteps(List<? extends JobStep> preCheckoutSteps)
Sets the value ofTaskWorkflowJobOptions.getPreCheckoutSteps()- Parameters:
preCheckoutSteps- Initial steps to run before the source code checkout.- Returns:
this
-
runsOn
@Stability(Experimental) public TaskWorkflowOptions.Builder runsOn(List<String> runsOn)
Sets the value ofTaskWorkflowJobOptions.getRunsOn()- Parameters:
runsOn- Github Runner selection labels.- Returns:
this
-
runsOnGroup
@Stability(Experimental) public TaskWorkflowOptions.Builder runsOnGroup(GroupRunnerOptions runsOnGroup)
Sets the value ofTaskWorkflowJobOptions.getRunsOnGroup()- Parameters:
runsOnGroup- Github Runner Group selection options.- Returns:
this
-
build
@Stability(Experimental) public TaskWorkflowOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TaskWorkflowOptions>- Returns:
- a new instance of
TaskWorkflowOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-