Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up CI/CD for an AWS CDK app using AWS CodeBuild/Deploy/Pipeline

I'm trying to setup a CI/CD pipeline for a dotnet app which uses AWS Lambda and AWS CDK for infrastructure. The source is on github and we have a Jenkins pipeline which runs the tests and publishes the artifacts. I want to use the artifact and deploy (or better use Code Deploy)

Can I use CodePipeline to run cdk deploy? How can I use CodeDeploy to do a dotnet test and dotnet publish? and then pass on the artifact to CodePipeline

like image 452
theabrar Avatar asked Oct 16 '25 02:10

theabrar


1 Answers

CodePipeline is a workflow service, it by itself cannot execute any commands. What you need is a Build/Test service like CodeBuild and/or Jenkins as part of the CodePipeline. This is where you will run the commands like 'cdk deploy', 'dotnet test' and 'dotnet publish'.

Once the Deployment artifacts are ready in the Build environment (using the aforementioned commands), the next CodePipeline Stage can use them to deploy - this is where a Service like CodeDeploy will be used.

CodePipeline is just orchestrating the workflow between the building block services like CodeCommit (Source), CodeBuild (Build/Test) and CodeDeploy (Deploy). There are many more integrations available.

Hope this helps.

like image 164
shariqmaws Avatar answered Oct 19 '25 00:10

shariqmaws



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!