Class PDKPipelineProps.Builder
- java.lang.Object
-
- software.aws.awsprototypingsdk.pipeline.PDKPipelineProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PDKPipelineProps>
- Enclosing interface:
- PDKPipelineProps
@Stability(Stable) public static final class PDKPipelineProps.Builder extends Object implements software.amazon.jsii.Builder<PDKPipelineProps>
A builder forPDKPipelineProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDKPipelineProps.BuilderassetPublishingCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions assetPublishingCodeBuildDefaults)Sets the value ofCodePipelineProps.getAssetPublishingCodeBuildDefaults()PDKPipelinePropsbuild()Builds the configured instance.PDKPipelineProps.BuildercliVersion(String cliVersion)Sets the value ofCodePipelineProps.getCliVersion()PDKPipelineProps.BuildercodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions codeBuildDefaults)Sets the value ofCodePipelineProps.getCodeBuildDefaults()PDKPipelineProps.BuildercodeCommitRemovalPolicy(software.amazon.awscdk.RemovalPolicy codeCommitRemovalPolicy)Sets the value ofPDKPipelineProps.getCodeCommitRemovalPolicy()PDKPipelineProps.BuildercodePipeline(software.amazon.awscdk.services.codepipeline.Pipeline codePipeline)Sets the value ofCodePipelineProps.getCodePipeline()PDKPipelineProps.BuildercrossAccountKeys(Boolean crossAccountKeys)Sets the value ofCodePipelineProps.getCrossAccountKeys()PDKPipelineProps.BuilderdefaultBranchName(String defaultBranchName)Sets the value ofPDKPipelineProps.getDefaultBranchName()PDKPipelineProps.BuilderdockerCredentials(List<? extends software.amazon.awscdk.pipelines.DockerCredential> dockerCredentials)Sets the value ofCodePipelineProps.getDockerCredentials()PDKPipelineProps.BuilderdockerEnabledForSelfMutation(Boolean dockerEnabledForSelfMutation)Sets the value ofCodePipelineProps.getDockerEnabledForSelfMutation()PDKPipelineProps.BuilderdockerEnabledForSynth(Boolean dockerEnabledForSynth)Sets the value ofCodePipelineProps.getDockerEnabledForSynth()PDKPipelineProps.BuilderenableKeyRotation(Boolean enableKeyRotation)Sets the value ofCodePipelineProps.getEnableKeyRotation()PDKPipelineProps.BuilderpipelineName(String pipelineName)Sets the value ofCodePipelineProps.getPipelineName()PDKPipelineProps.BuilderprimarySynthDirectory(String primarySynthDirectory)Sets the value ofPDKPipelineProps.getPrimarySynthDirectory()PDKPipelineProps.BuilderpublishAssetsInParallel(Boolean publishAssetsInParallel)Sets the value ofCodePipelineProps.getPublishAssetsInParallel()PDKPipelineProps.BuilderrepositoryName(String repositoryName)Sets the value ofPDKPipelineProps.getRepositoryName()PDKPipelineProps.BuilderreuseCrossRegionSupportStacks(Boolean reuseCrossRegionSupportStacks)Sets the value ofCodePipelineProps.getReuseCrossRegionSupportStacks()PDKPipelineProps.Builderrole(software.amazon.awscdk.services.iam.IRole role)Sets the value ofCodePipelineProps.getRole()PDKPipelineProps.BuilderselfMutation(Boolean selfMutation)Sets the value ofCodePipelineProps.getSelfMutation()PDKPipelineProps.BuilderselfMutationCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions selfMutationCodeBuildDefaults)Sets the value ofCodePipelineProps.getSelfMutationCodeBuildDefaults()PDKPipelineProps.BuildersonarCodeScannerConfig(SonarCodeScannerConfig sonarCodeScannerConfig)Sets the value ofPDKPipelineProps.getSonarCodeScannerConfig()PDKPipelineProps.Buildersynth(software.amazon.awscdk.pipelines.IFileSetProducer synth)Sets the value ofCodePipelineProps.getSynth()PDKPipelineProps.BuildersynthCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions synthCodeBuildDefaults)Sets the value ofCodePipelineProps.getSynthCodeBuildDefaults()PDKPipelineProps.BuildersynthShellStepPartialProps(software.amazon.awscdk.pipelines.ShellStepProps synthShellStepPartialProps)Sets the value ofPDKPipelineProps.getSynthShellStepPartialProps()PDKPipelineProps.BuilderuseChangeSets(Boolean useChangeSets)Sets the value ofCodePipelineProps.getUseChangeSets()
-
-
-
Method Detail
-
primarySynthDirectory
@Stability(Stable) public PDKPipelineProps.Builder primarySynthDirectory(String primarySynthDirectory)
Sets the value ofPDKPipelineProps.getPrimarySynthDirectory()- Parameters:
primarySynthDirectory- Output directory for cdk synthesized artifacts i.e: packages/infra/cdk.out. This parameter is required.- Returns:
this
-
repositoryName
@Stability(Stable) public PDKPipelineProps.Builder repositoryName(String repositoryName)
Sets the value ofPDKPipelineProps.getRepositoryName()- Parameters:
repositoryName- Name of the CodeCommit repository to create. This parameter is required.- Returns:
this
-
codeCommitRemovalPolicy
@Stability(Stable) public PDKPipelineProps.Builder codeCommitRemovalPolicy(software.amazon.awscdk.RemovalPolicy codeCommitRemovalPolicy)
Sets the value ofPDKPipelineProps.getCodeCommitRemovalPolicy()- Parameters:
codeCommitRemovalPolicy- Possible values for a resource's Removal Policy The removal policy controls what happens to the resource if it stops being managed by CloudFormation.- Returns:
this
-
defaultBranchName
@Stability(Stable) public PDKPipelineProps.Builder defaultBranchName(String defaultBranchName)
Sets the value ofPDKPipelineProps.getDefaultBranchName()- Parameters:
defaultBranchName- Branch to trigger the pipeline execution.- Returns:
this
-
sonarCodeScannerConfig
@Stability(Stable) public PDKPipelineProps.Builder sonarCodeScannerConfig(SonarCodeScannerConfig sonarCodeScannerConfig)
Sets the value ofPDKPipelineProps.getSonarCodeScannerConfig()- Parameters:
sonarCodeScannerConfig- Configuration for enabling Sonarqube code scanning on a successful synth.- Returns:
this
-
synthShellStepPartialProps
@Stability(Stable) public PDKPipelineProps.Builder synthShellStepPartialProps(software.amazon.awscdk.pipelines.ShellStepProps synthShellStepPartialProps)
Sets the value ofPDKPipelineProps.getSynthShellStepPartialProps()- Parameters:
synthShellStepPartialProps- PDKPipeline by default assumes a NX Monorepo structure for it's codebase and uses sane defaults for the install and run commands. To override these defaults and/or provide additional inputs, specify env settings, etc you can provide a partial ShellStepProps.- Returns:
this
-
synth
@Stability(Stable) public PDKPipelineProps.Builder synth(software.amazon.awscdk.pipelines.IFileSetProducer synth)
Sets the value ofCodePipelineProps.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
-
assetPublishingCodeBuildDefaults
@Stability(Stable) public PDKPipelineProps.Builder assetPublishingCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions assetPublishingCodeBuildDefaults)
Sets the value ofCodePipelineProps.getAssetPublishingCodeBuildDefaults()- Parameters:
assetPublishingCodeBuildDefaults- Additional customizations to apply to the asset publishing CodeBuild projects.- Returns:
this
-
cliVersion
@Stability(Stable) public PDKPipelineProps.Builder cliVersion(String cliVersion)
Sets the value ofCodePipelineProps.getCliVersion()- Parameters:
cliVersion- CDK CLI version to use in self-mutation and asset publishing steps. If you want to lock the CDK CLI version used in the pipeline, by steps that are automatically generated for you, specify the version here.We recommend you do not specify this value, as not specifying it always uses the latest CLI version which is backwards compatible with old versions.
If you do specify it, be aware that this version should always be equal to or higher than the version of the CDK framework used by the CDK app, when the CDK commands are run during your pipeline execution. When you change this version, the next time the
SelfMutatestep runs it will still be using the CLI of the the previous version that was in this property: it will only start using the new version afterSelfMutatecompletes successfully. That means that if you want to update both framework and CLI version, you should update the CLI version first, commit, push and deploy, and only then update the framework version.- Returns:
this
-
codeBuildDefaults
@Stability(Stable) public PDKPipelineProps.Builder codeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions codeBuildDefaults)
Sets the value ofCodePipelineProps.getCodeBuildDefaults()- Parameters:
codeBuildDefaults- Customize the CodeBuild projects created for this pipeline.- Returns:
this
-
codePipeline
@Stability(Stable) public PDKPipelineProps.Builder codePipeline(software.amazon.awscdk.services.codepipeline.Pipeline codePipeline)
Sets the value ofCodePipelineProps.getCodePipeline()- Parameters:
codePipeline- An existing Pipeline to be reused and built upon. [disable-awslint:ref-via-interface]- Returns:
this
-
crossAccountKeys
@Stability(Stable) public PDKPipelineProps.Builder crossAccountKeys(Boolean crossAccountKeys)
Sets the value ofCodePipelineProps.getCrossAccountKeys()- Parameters:
crossAccountKeys- Create KMS keys for the artifact buckets, allowing cross-account deployments. The artifact buckets have to be encrypted to support deploying CDK apps to another account, so if you want to do that or want to have your artifact buckets encrypted, be sure to set this value totrue.Be aware there is a cost associated with maintaining the KMS keys.
- Returns:
this
-
dockerCredentials
@Stability(Stable) public PDKPipelineProps.Builder dockerCredentials(List<? extends software.amazon.awscdk.pipelines.DockerCredential> dockerCredentials)
Sets the value ofCodePipelineProps.getDockerCredentials()- Parameters:
dockerCredentials- A list of credentials used to authenticate to Docker registries. Specify any credentials necessary within the pipeline to build, synth, update, or publish assets.- Returns:
this
-
dockerEnabledForSelfMutation
@Stability(Stable) public PDKPipelineProps.Builder dockerEnabledForSelfMutation(Boolean dockerEnabledForSelfMutation)
Sets the value ofCodePipelineProps.getDockerEnabledForSelfMutation()- Parameters:
dockerEnabledForSelfMutation- Enable Docker for the self-mutate step. Set this to true if the pipeline itself uses Docker container assets (for example, if you useLinuxBuildImage.fromAsset()as the build image of a CodeBuild step in the pipeline).You do not need to set it if you build Docker image assets in the application Stages and Stacks that are deployed by this pipeline.
Configures privileged mode for the self-mutation CodeBuild action.
If you are about to turn this on in an already-deployed Pipeline, set the value to
truefirst, commit and allow the pipeline to self-update, and only then use the Docker asset in the pipeline.- Returns:
this
-
dockerEnabledForSynth
@Stability(Stable) public PDKPipelineProps.Builder dockerEnabledForSynth(Boolean dockerEnabledForSynth)
Sets the value ofCodePipelineProps.getDockerEnabledForSynth()- Parameters:
dockerEnabledForSynth- Enable Docker for the 'synth' step. Set this to true if you are using file assets that require "bundling" anywhere in your application (meaning an asset compilation step will be run with the tools provided by a Docker image), both for the Pipeline stack as well as the application stacks.A common way to use bundling assets in your application is by using the
@aws-cdk/aws-lambda-nodejslibrary.Configures privileged mode for the synth CodeBuild action.
If you are about to turn this on in an already-deployed Pipeline, set the value to
truefirst, commit and allow the pipeline to self-update, and only then use the bundled asset.- Returns:
this
-
enableKeyRotation
@Stability(Stable) public PDKPipelineProps.Builder enableKeyRotation(Boolean enableKeyRotation)
Sets the value ofCodePipelineProps.getEnableKeyRotation()- Parameters:
enableKeyRotation- Enable KMS key rotation for the generated KMS keys. By default KMS key rotation is disabled, but will add additional costs when enabled.- Returns:
this
-
pipelineName
@Stability(Stable) public PDKPipelineProps.Builder pipelineName(String pipelineName)
Sets the value ofCodePipelineProps.getPipelineName()- Parameters:
pipelineName- The name of the CodePipeline pipeline.- Returns:
this
-
publishAssetsInParallel
@Stability(Stable) public PDKPipelineProps.Builder publishAssetsInParallel(Boolean publishAssetsInParallel)
Sets the value ofCodePipelineProps.getPublishAssetsInParallel()- Parameters:
publishAssetsInParallel- Publish assets in multiple CodeBuild projects. If set to false, use one Project per type to publish all assets.Publishing in parallel improves concurrency and may reduce publishing latency, but may also increase overall provisioning time of the CodeBuild projects.
Experiment and see what value works best for you.
- Returns:
this
-
reuseCrossRegionSupportStacks
@Stability(Stable) public PDKPipelineProps.Builder reuseCrossRegionSupportStacks(Boolean reuseCrossRegionSupportStacks)
Sets the value ofCodePipelineProps.getReuseCrossRegionSupportStacks()- Parameters:
reuseCrossRegionSupportStacks- Reuse the same cross region support stack for all pipelines in the App.- Returns:
this
-
role
@Stability(Stable) public PDKPipelineProps.Builder role(software.amazon.awscdk.services.iam.IRole role)
Sets the value ofCodePipelineProps.getRole()- Parameters:
role- The IAM role to be assumed by this Pipeline.- Returns:
this
-
selfMutation
@Stability(Stable) public PDKPipelineProps.Builder selfMutation(Boolean selfMutation)
Sets the value ofCodePipelineProps.getSelfMutation()- Parameters:
selfMutation- Whether the pipeline will update itself. This needs to be set totrueto allow the pipeline to reconfigure itself when assets or stages are being added to it, andtrueis the recommended setting.You can temporarily set this to
falsewhile you are iterating on the pipeline itself and prefer to deploy changes usingcdk deploy.- Returns:
this
-
selfMutationCodeBuildDefaults
@Stability(Stable) public PDKPipelineProps.Builder selfMutationCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions selfMutationCodeBuildDefaults)
Sets the value ofCodePipelineProps.getSelfMutationCodeBuildDefaults()- Parameters:
selfMutationCodeBuildDefaults- Additional customizations to apply to the self mutation CodeBuild projects.- Returns:
this
-
synthCodeBuildDefaults
@Stability(Stable) public PDKPipelineProps.Builder synthCodeBuildDefaults(software.amazon.awscdk.pipelines.CodeBuildOptions synthCodeBuildDefaults)
Sets the value ofCodePipelineProps.getSynthCodeBuildDefaults()- Parameters:
synthCodeBuildDefaults- Additional customizations to apply to the synthesize CodeBuild projects.- Returns:
this
-
useChangeSets
@Stability(Stable) public PDKPipelineProps.Builder useChangeSets(Boolean useChangeSets)
Sets the value ofCodePipelineProps.getUseChangeSets()- Parameters:
useChangeSets- Deploy every stack by creating a change set and executing it. When enabled, creates a "Prepare" and "Execute" action for each stack. Disable to deploy the stack in one pipeline action.- Returns:
this
-
build
@Stability(Stable) public PDKPipelineProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PDKPipelineProps>- Returns:
- a new instance of
PDKPipelineProps - Throws:
NullPointerException- if any required attribute was not provided
-
-