Class GitHubWorkflowProps.Builder
- java.lang.Object
-
- io.github.cdklabs.cdkpipelines.github.GitHubWorkflowProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<GitHubWorkflowProps>
- Enclosing interface:
- GitHubWorkflowProps
@Stability(Stable) public static final class GitHubWorkflowProps.Builder extends Object implements software.amazon.jsii.Builder<GitHubWorkflowProps>
A builder forGitHubWorkflowProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
awsCredentials
@Stability(Stable) public GitHubWorkflowProps.Builder awsCredentials(AwsCredentialsSecrets awsCredentials)
Sets the value ofGitHubWorkflowProps.getAwsCredentials()- Parameters:
awsCredentials- Names of GitHub repository secrets that include AWS credentials for deployment.- Returns:
this
-
buildContainer
@Stability(Stable) public GitHubWorkflowProps.Builder buildContainer(ContainerOptions buildContainer)
Sets the value ofGitHubWorkflowProps.getBuildContainer()- Parameters:
buildContainer- Build container options.- Returns:
this
-
cdkCliVersion
@Stability(Stable) public GitHubWorkflowProps.Builder cdkCliVersion(String cdkCliVersion)
Sets the value ofGitHubWorkflowProps.getCdkCliVersion()- Parameters:
cdkCliVersion- Version of the CDK CLI to use.- Returns:
this
-
dockerCredentials
@Stability(Stable) public GitHubWorkflowProps.Builder dockerCredentials(List<? extends DockerCredential> dockerCredentials)
Sets the value ofGitHubWorkflowProps.getDockerCredentials()- Parameters:
dockerCredentials- The Docker Credentials to use to login. If you set this variable, you will be logged in to docker when you upload Docker Assets.- Returns:
this
-
gitHubActionRoleArn
@Stability(Stable) public GitHubWorkflowProps.Builder gitHubActionRoleArn(String gitHubActionRoleArn)
Sets the value ofGitHubWorkflowProps.getGitHubActionRoleArn()- Parameters:
gitHubActionRoleArn- A role that utilizes the GitHub OIDC Identity Provider in your AWS account. If supplied, this will be used instead ofawsCredentials.You can create your own role in the console with the necessary trust policy to allow gitHub actions from your gitHub repository to assume the role, or you can utilize the
GitHubActionRoleconstruct to create a role for you.- Returns:
this
-
postBuildSteps
@Stability(Stable) public GitHubWorkflowProps.Builder postBuildSteps(List<? extends JobStep> postBuildSteps)
Sets the value ofGitHubWorkflowProps.getPostBuildSteps()- Parameters:
postBuildSteps- GitHub workflow steps to execute after build.- Returns:
this
-
preBuildSteps
@Stability(Stable) public GitHubWorkflowProps.Builder preBuildSteps(List<? extends JobStep> preBuildSteps)
Sets the value ofGitHubWorkflowProps.getPreBuildSteps()- Parameters:
preBuildSteps- GitHub workflow steps to execute before build.- Returns:
this
-
preSynthed
@Stability(Stable) public GitHubWorkflowProps.Builder preSynthed(Boolean preSynthed)
Sets the value ofGitHubWorkflowProps.getPreSynthed()- Parameters:
preSynthed- Indicates if the repository already contains a synthesized `cdk.out` directory, in which case we will simply checkout the repo in jobs that require `cdk.out`.- Returns:
this
-
publishAssetsAuthRegion
@Stability(Stable) public GitHubWorkflowProps.Builder publishAssetsAuthRegion(String publishAssetsAuthRegion)
Sets the value ofGitHubWorkflowProps.getPublishAssetsAuthRegion()- Parameters:
publishAssetsAuthRegion- Will assume the GitHubActionRole in this region when publishing assets. This is NOT the region in which the assets are published.In most cases, you do not have to worry about this property, and can safely ignore it.
- Returns:
this
-
runner
@Stability(Stable) public GitHubWorkflowProps.Builder runner(Runner runner)
Sets the value ofGitHubWorkflowProps.getRunner()- Parameters:
runner- The type of runner to run the job on. The runner can be either a GitHub-hosted runner or a self-hosted runner.- Returns:
this
-
workflowName
@Stability(Stable) public GitHubWorkflowProps.Builder workflowName(String workflowName)
Sets the value ofGitHubWorkflowProps.getWorkflowName()- Parameters:
workflowName- Name of the workflow.- Returns:
this
-
workflowPath
@Stability(Stable) public GitHubWorkflowProps.Builder workflowPath(String workflowPath)
Sets the value ofGitHubWorkflowProps.getWorkflowPath()- Parameters:
workflowPath- File path for the GitHub workflow.- Returns:
this
-
workflowTriggers
@Stability(Stable) public GitHubWorkflowProps.Builder workflowTriggers(WorkflowTriggers workflowTriggers)
Sets the value ofGitHubWorkflowProps.getWorkflowTriggers()- Parameters:
workflowTriggers- GitHub workflow triggers.- Returns:
this
-
synth
@Stability(Stable) public GitHubWorkflowProps.Builder synth(software.amazon.awscdk.pipelines.IFileSetProducer synth)
Sets the value ofPipelineBaseProps.getSynth()- Parameters:
synth- The build step that produces the CDK Cloud Assembly. This parameter is required. The primary output of this step needs to be thecdk.outdirectory generated by thecdk synthcommand.If you use a
ShellStephere and you don't configure an output directory, the output directory will automatically be assumed to becdk.out.- Returns:
this
-
build
@Stability(Stable) public GitHubWorkflowProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GitHubWorkflowProps>- Returns:
- a new instance of
GitHubWorkflowProps - Throws:
NullPointerException- if any required attribute was not provided
-
-