aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.92k forks source link

[cdk-pipelines] Reuse CodeBuild projects between assets #9629

Open rix0rrr opened 4 years ago

rix0rrr commented 4 years ago

A CodeBuild project per asset is a little much, especially since we could reuse 1 CodeBuild project for file assets and 1 CodeBuild project for docker assets, and invoke them differently for every asset type.


This is a :rocket: Feature Request

adelsz commented 2 years ago

Good point, having a huge list of CodeBuild projects for a not-so-big CDK stack does look weird.

p-mercury commented 1 year ago

I agree, in my opinion the speed benefit of deploying the assets in parallel seems to be minor over the added complexity in resources, and it also seems to be causing issues where changing asset hashes cause the pipeline to update itself multiple times, sometimes in an infinite loop.

I recently created a CLI tool that deploys all assets based on the manifest.json which allows you to deploy all assets in a single code build instance.

I am also currently working on a custom Pipeline construct which solves this and a couple of other problems that I see with the CDK native CodePipeline L3 construct.

I hope this helps.