Create an extra CDK CodePipeline Stage, deploying to ElasticBeanstalk #25893
Replies: 1 comment
-
You are indeed getting the compilation issue there because of the 2 different packages provided by the AWS CDK. The The I was having similar issue when first looking at this and I came across this repository which is a nice start to understand the workflow better. It should support you to building your pipelines using the beanstalk deploy action. https://github.com/mikaeelkhalid/deploy-elasticbeanstalk-codepipeline-cdk |
Beta Was this translation helpful? Give feedback.
-
Goal:
A pipeline where I can have my code deployed to ElasticBeanstalk after all the infrastructure has been provisioned with CDK (using TypeScript).
CodePipeline Stages should (happy to hear sugestions) flow like this:
Source (Gets source code) >> Build (For pipeline infra) >> UpdatePipeline >> AppInfra (For ElasticBeanstalk infra) >> DeployAppCode (deploy the Artifact code from one of the earlier Build stages)
Following this thread for advice on using CodePipeline instead of CodeBuild (which seems simple enough in console)
and this as a model for how to set it up in CDK.
Current code:
pipeline-stack.ts (main CodePipeline setup)
stage.ts (I define my stages from other Stacks here as a central place)
elasticbeanstalk-stacl.ts
Issue:
The following in 'pipeline-stack.ts' comes up with:
"Argument of type '{ stageName: string; actions: cdk.aws_codepipeline_actions.ElasticBeanstalkDeployAction[]; }' is not assignable to parameter of type 'Stage'.
Object literal may only specify known properties, and 'actions' does not exist in type 'Stage'."
Beta Was this translation helpful? Give feedback.
All reactions