The Parent Child Pipelines construct allows users to use Pipelines V1 to handle mono repo deployments such that child pipelines are triggered depending on the folder and file changes in the parent repository.
It is written in Typescript to wrap the AWS CDK CodePipeline construct and is designed to be used in a CDK application.
The Parent Pipeline is triggered on all changes to the repository. It uses a CodeBuild project to determine the changes in the repository and then triggers the Child Pipelines based on the changes.
See the example/ directory for complete examples.
- Implement the Child Pipeline construct in the individual app/stacks that you want to deploy.
- Implement the Parent Pipeline construct in either a general infrastructure CDK app/stack or as a standalone app/stack within your mono-repo.
- Deploy the pipelines to your pipeline/infrastructure AWS Account.
That's it! The Parent Pipeline will now trigger the Child Pipelines based on the changes in the parent repository.
Pre-Requisite: Install Bun
curl https://bun.sh/install | bash
Install the packages
bun install
Pre-requisite: make sure you have aws permissions to invoke the pipelines and that you've built the project
bun run execute-child-pipelines
We use projen to manage the configurations and scripts. See the projen documentation for more information.
Using the following commands from the project directory
npx projen new awscdk-construct
bun i