Skip to content
v2.278.0

PipelineBase ​

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 ​

ts
new PipelineBase(scope: Construct, id: string, props: PipelineBaseProps)
python
PipelineBase(scope: Construct, id: str, props: PipelineBaseProps)
java
new PipelineBase(Construct scope, String id, PipelineBaseProps props)
csharp
new PipelineBase(Construct scope, string id, PipelineBaseProps props)
go
NewPipelineBase(Scope Construct, Id *string, Props PipelineBaseProps)

Construct Props ​

The build step that produces the CDK Cloud Assembly.
notes

The primary output of this step needs to be the cdk.out directory generated by the cdk synth command.

If you use a ShellStep here and you don't configure an output directory, the output directory will automatically be assumed to be cdk.out.

Properties ​

cloudAssemblyFileSetFileSetcloud_assembly_file_setFileSetcloudAssemblyFileSetFileSetCloudAssemblyFileSetFileSetCloudAssemblyFileSetFileSet #
The FileSet tha contains the cloud assembly.

This is the primary output of the synth step.

nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
The build step that produces the CDK Cloud Assembly.
wavesWave[]wavestyping.List[Wave]wavesList<Wave>WavesWave[]Waves*[]Wave #
The waves in this pipeline.

Methods ​

addStage(stage: Stage, options?: AddStageOpts): StageDeploymentdef add_stage(self, stage: Stage, options: typing.Optional[AddStageOpts] = None) -> StageDeploymentpublic StageDeployment addStage(Stage stage, AddStageOpts options)public StageDeployment AddStage(Stage stage, AddStageOpts? options = null)func AddStage(Stage Stage, Options AddStageOpts) 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: string, options?: WaveOptions): Wavedef add_wave(self, id: str, options: typing.Optional[WaveOptions] = None) -> Wavepublic Wave addWave(String id, WaveOptions options)public Wave AddWave(string id, WaveOptions? options = null)func AddWave(Id *string, Options WaveOptions) Wave #
Add a Wave to the pipeline, for deploying multiple Stages in parallel.
notes

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

Example:

ts
declare const pipeline: pipelines.CodePipeline;

const wave = pipeline.addWave('MyWave');
wave.addStage(new MyApplicationStage(this, 'Stage1'));
wave.addStage(new MyApplicationStage(this, 'Stage2'));
buildPipeline(): voiddef build_pipeline(self, ) -> Nonepublic void buildPipeline()public void BuildPipeline()func BuildPipeline() #
Send the current pipeline definition to the engine, and construct the pipeline.

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

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isPipeline(x: any): boolean@staticmethod def is_pipeline(x: Any) -> boolpublic static Boolean isPipeline(Object x)public static bool IsPipeline(object x)func IsPipeline(X interface{}) *bool static #
Return whether the given object extends `PipelineBase`.

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

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining