cdk-cosmos / cosmos

Cdk Cosmos Packages
https://cdk-cosmos.github.io/law
Apache License 2.0
23 stars 18 forks source link

CiCd deploy stage in templates #310

Open clairemr opened 3 years ago

clairemr commented 3 years ago

Add CiCd stage to start of pipeline to implement CiCd changes before other stacks

timpur commented 3 years ago

We can pull out some code from cdk pipelines stack

https://github.com/aws/aws-cdk/blob/d8dc8185203e73172786024eea90eeb60153ce0e/packages/%40aws-cdk/pipelines/lib/codepipeline/codepipeline.ts#L572

clairemr commented 3 years ago

As a simple fix I've manually added a CiCd stage at the start of the core & app cdk pipelines ciCd.ciCd?.addDeployStackStage({ name: "DeployCiCd", stacks: [ciCd], isManualApprovalRequired: false, });

timpur commented 3 years ago

in https://github.com/cdk-cosmos/cosmos/blob/develop/packages/%40cosmos-building-blocks/pipeline/src/pipeline/cdk-pipeline.ts at the end of the constructer

this.addDeployStackStage({name:"SelfMutate", stacks:[Stack.of(this)], isManualApprovalRequired: false})

can add a prop and if around this to add the SelfMutate