Package io.github.cdklabs.projen.github
Class TaskWorkflowJobOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.TaskWorkflowJobOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TaskWorkflowJobOptions>
- Enclosing interface:
- TaskWorkflowJobOptions
@Stability(Experimental) public static final class TaskWorkflowJobOptions.Builder extends Object implements software.amazon.jsii.Builder<TaskWorkflowJobOptions>
A builder forTaskWorkflowJobOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
permissions
@Stability(Experimental) public TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.Builder condition(String condition)
Sets the value ofTaskWorkflowJobOptions.getCondition()- Parameters:
condition- Adds an 'if' condition to the workflow.- Returns:
this
-
container
@Stability(Experimental) public TaskWorkflowJobOptions.Builder container(ContainerOptions container)
Sets the value ofTaskWorkflowJobOptions.getContainer()- Parameters:
container- the value to be set.- Returns:
this
-
downloadLfs
@Stability(Experimental) public TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.Builder env(Map<String,String> env)
Sets the value ofTaskWorkflowJobOptions.getEnv()- Parameters:
env- Workflow environment variables.- Returns:
this
-
gitIdentity
@Stability(Experimental) public TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.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 TaskWorkflowJobOptions.Builder runsOn(List<String> runsOn)
Sets the value ofTaskWorkflowJobOptions.getRunsOn()- Parameters:
runsOn- Github Runner selection labels.- Returns:
this
-
runsOnGroup
@Stability(Experimental) public TaskWorkflowJobOptions.Builder runsOnGroup(GroupRunnerOptions runsOnGroup)
Sets the value ofTaskWorkflowJobOptions.getRunsOnGroup()- Parameters:
runsOnGroup- Github Runner Group selection options.- Returns:
this
-
build
@Stability(Experimental) public TaskWorkflowJobOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TaskWorkflowJobOptions>- Returns:
- a new instance of
TaskWorkflowJobOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-