class PipelineBase
Language | Type name |
---|---|
.NET | Amazon.CDK.Pipelines.PipelineBase |
Go | github.com/aws/aws-cdk-go/awscdk/v2/pipelines#PipelineBase |
Java | software.amazon.awscdk.pipelines.PipelineBase |
Python | aws_cdk.pipelines.PipelineBase |
TypeScript (source) | aws-cdk-lib » pipelines » PipelineBase |
Implements
IConstruct
, IDependable
Extends
Construct
Implemented by
Code
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
Pipeline
Base Props
Properties
Name | Type | Description |
---|---|---|
cloud | File | The FileSet tha contains the cloud assembly. |
node | Node | The tree node. |
synth | IFile | The build step that produces the CDK Cloud Assembly. |
waves | Wave [] | The waves in this pipeline. |
cloudAssemblyFileSet
Type:
File
The FileSet tha contains the cloud assembly.
This is the primary output of the synth step.
node
Type:
Node
The tree node.
synth
Type:
IFile
The build step that produces the CDK Cloud Assembly.
waves
Type:
Wave
[]
The waves in this pipeline.
Methods
Name | Description |
---|---|
add | Deploy a single Stage by itself. |
add | Add a Wave to the pipeline, for deploying multiple Stages in parallel. |
build | Send the current pipeline definition to the engine, and construct the pipeline. |
to | Returns a string representation of this construct. |
protected do | Implemented by subclasses to do the actual pipeline construction. |
static is | Return whether the given object extends PipelineBase . |
addStage(stage, options?)
public addStage(stage: Stage, options?: AddStageOpts): StageDeployment
Parameters
- stage
Stage
- options
Add
Stage Opts
Returns
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
Wave
Options
Returns
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'.