Whenever a Pull Request is created in a repository in code commit, I want to run a code Build on the same repo. I have multiple repositories having PR's created for each and I want to use the single/same code build project to run the different repos, is that possible? PS: I don't want to create 50 code build projects for 50 repo's it is difficult to maintain.
Asked
Active
Viewed 811 times
2
-
" is that possible? " - no, its not possible. – Marcin Nov 18 '21 at 07:07
-
So, do I have to create a code build project for every repository? – Shashank S Nov 18 '21 at 07:22
-
2It is possible to use single project for multiple repository. https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html – Akshay Gopani Jan 02 '22 at 11:53
2 Answers
0
"is that possible?" - no, its not possible. As Marcin say.
That's why I use IaC.
I recommend that you search the AWS CDK.
You can manage 50 codebuild by for loop.
Like this.
var arr = ["codecommit1", "codecommit2", ..., "codecommit50"]
arr.forEach(repo => {
new AwsCodepipelineCdkStack(repo);
});

HODONG
- 13
- 4
0
As Akshay Gopani suggested, CodeBuild supports that now I think: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html

xiwang
- 1