aws-cdk-lib.pipelines.PipelineBase

class PipelineBase

LanguageType name
.NETAmazon.CDK.Pipelines.PipelineBase
Gogithub.com/aws/aws-cdk-go/awscdk/v2/pipelines#PipelineBase
Javasoftware.amazon.awscdk.pipelines.PipelineBase
Pythonaws_cdk.pipelines.PipelineBase
TypeScript (source)aws-cdk-lib » pipelines » PipelineBase

Implements IConstruct, IDependable

Extends Construct

Implemented by CodePipeline

A generic CDK Pipelines pipeline.

Different deployment systems will provide subclasses of Pipeline that generate the deployment infrastructure necessary to deploy CDK apps, specific to that system.

This library comes with the CodePipeline class, which uses AWS CodePipeline to deploy CDK apps.

The actual pipeline infrastructure is constructed (by invoking the engine) when buildPipeline() is called, or when app.synth() is called (whichever happens first).

Initializer

new PipelineBase(scope: Construct, id: string, props: PipelineBaseProps)

Parameters

  • scope Construct
  • id string
  • props PipelineBaseProps

Properties

NameTypeDescription
cloudAssemblyFileSetFileSetThe FileSet tha contains the cloud assembly.
nodeNodeThe tree node.
synthIFileSetProducerThe build step that produces the CDK Cloud Assembly.
wavesWave[]The waves in this pipeline.

cloudAssemblyFileSet

Type: FileSet

The FileSet tha contains the cloud assembly.

This is the primary output of the synth step.


node

Type: Node

The tree node.


synth

Type: IFileSetProducer

The build step that produces the CDK Cloud Assembly.


waves

Type: Wave[]

The waves in this pipeline.

Methods

NameDescription
addStage(stage, options?)Deploy a single Stage by itself.
addWave(id, options?)Add a Wave to the pipeline, for deploying multiple Stages in parallel.
buildPipeline()Send the current pipeline definition to the engine, and construct the pipeline.
toString()Returns a string representation of this construct.
protected doBuildPipeline()Implemented by subclasses to do the actual pipeline construction.
static isPipeline(x)Return whether the given object extends PipelineBase.

addStage(stage, options?)

public addStage(stage: Stage, options?: AddStageOpts): StageDeployment

Parameters

  • stage Stage
  • options AddStageOpts

Returns

  • StageDeployment

Deploy a single Stage by itself.

Add a Stage to the pipeline, to be deployed in sequence with other Stages added to the pipeline. All Stacks in the stage will be deployed in an order automatically determined by their relative dependencies.


addWave(id, options?)

public addWave(id: string, options?: WaveOptions): Wave

Parameters

  • id string
  • options WaveOptions

Returns

  • Wave

Add a Wave to the pipeline, for deploying multiple Stages in parallel.

Use the return object of this method to deploy multiple stages in parallel.

Example:

declare const pipeline: pipelines.CodePipeline;

const wave = pipeline.addWave('MyWave');
wave.addStage(new MyApplicationStage(this, 'Stage1'));
wave.addStage(new MyApplicationStage(this, 'Stage2'));

buildPipeline()

public buildPipeline(): void

Send the current pipeline definition to the engine, and construct the pipeline.

It is not possible to modify the pipeline after calling this method.


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected doBuildPipeline()

protected doBuildPipeline(): void

Implemented by subclasses to do the actual pipeline construction.


static isPipeline(x)

public static isPipeline(x: any): boolean

Parameters

  • x any

Returns

  • boolean

Return whether the given object extends PipelineBase.

We do attribute detection since we can't reliably use 'instanceof'.