class CdkPipeline (construct)
A Pipeline to deploy CDK apps.
Defines an AWS CodePipeline-based Pipeline to deploy CDK applications.
Automatically manages the following:
- Stack dependency order.
- Asset publishing.
- Keeping the pipeline up-to-date as the CDK apps change.
- Using stack outputs later on in the pipeline.
new CdkPipeline(scope: Construct, id: string, props: CdkPipelineProps)
|cloud||The artifact you have defined to be the artifact to hold the cloudAssemblyArtifact for the synth action.|
|source||The CodePipeline action used to retrieve the CDK app's source.|
|synth||The CodePipeline action build and synthesis step of the CDK app.|
|cdk||CDK CLI version to use in pipeline.|
|pipeline||Name of the pipeline.|
The artifact you have defined to be the artifact to hold the cloudAssemblyArtifact for the synth action.
The CodePipeline action used to retrieve the CDK app's source.
The CodePipeline action build and synthesis step of the CDK app.
(optional, default: Latest version)
CDK CLI version to use in pipeline.
Some Actions in the pipeline will download and run a version of the CDK CLI. Specify the version here.
(optional, default: A name is automatically generated)
Name of the pipeline.
|node||The construct tree node associated with this construct.|
The construct tree node associated with this construct.
|add||Add pipeline stage that will deploy the given application stage.|
|add||Add a new, empty stage to the pipeline.|
|stack||Get the StackOutput object that holds this CfnOutput's value in this pipeline.|
|to||Returns a string representation of this construct.|
|protected on||Perform final modifications before synthesis.|
|protected validate()||Validate that we don't have any stacks violating dependency order in the pipeline.|
Application Stage(appStage, options?)
public addApplicationStage(appStage: Stage, options?: AddStageOptions): CdkStage
Add pipeline stage that will deploy the given application stage.
The application construct should subclass
Stage and can contain any
Stacks inside it that may have dependency relationships
on one another.
All stacks in the application will be deployed in the appropriate order, and all assets found in the application will be added to the asset publishing stage.
public addStage(stageName: string): CdkStage
Add a new, empty stage to the pipeline.
Prefer to use
addApplicationStage if you are intended to deploy a CDK
application, but you can use this method if you want to add other kinds of
Actions to a pipeline.
public stackOutput(cfnOutput: CfnOutput): StackOutput
Get the StackOutput object that holds this CfnOutput's value in this pipeline.
StackOutput can be used in validation actions later in the pipeline.
public toString(): string
Returns a string representation of this construct.
protected onPrepare(): void
Perform final modifications before synthesis.
This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.
This is an advanced framework feature. Only use this if you understand the implications.
protected validate(): Array<string>
Validate that we don't have any stacks violating dependency order in the pipeline.
Our own convenience methods will never generate a pipeline that does that (although this is a nice verification), but a user can also add the stacks by hand.