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).
| Source | pipelines/lib/main/pipeline-base.ts |
|---|---|
| Type last changed |
Initializer
new PipelineBase(scope: Construct, id: string, props: PipelineBaseProps)
PipelineBase(scope: Construct, id: str, props: PipelineBaseProps)
new PipelineBase(Construct scope, String id, PipelineBaseProps props)
new PipelineBase(Construct scope, string id, PipelineBaseProps props)
NewPipelineBase(Scope Construct, Id *string, Props PipelineBaseProps)
Construct Props
synthIFileSetProducersynthIFileSetProducersynthIFileSetProducerSynthIFileSetProducerSynthIFileSetProducer required #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 #This is the primary output of the synth step.
synthIFileSetProducersynthIFileSetProducersynthIFileSetProducerSynthIFileSetProducerSynthIFileSetProducer #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 #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 #notes
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(): voiddef build_pipeline(self, ) -> Nonepublic void buildPipeline()public void BuildPipeline()func BuildPipeline() #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 #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 #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 #with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #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