best approach to run codebuild steps in parallel?

0

I'm new to CodeBuild and have built a CodeBuild project that builds a set of AMIs.

It takes a long time to run. In other build systems like circleci and concourse I've used features that allow build steps to run in separate docker containers in parallel and the build system waits for them all to finish and then proceeds to the next step. I was hoping to build each AMI in a separate parallel docker container instead of serially.

Does CodeBuild support something like this? I don't see that it does...

If it doesn't, what is the best approach? Is this a use case for CodePipeline?

I could also pass in each ami as a parameter to the build and run n copies of the build simultaneously (trigger with a script).

Thanks for any thoughts!

posta 5 anni fa1592 visualizzazioni
3 Risposte
1

you can now use official batch builds and build matrix https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html

con risposta un anno fa
0

I think it's possible to do so. create several actions inside CodeBuild. For each action, point the "input_artifact" to the same source.

con risposta 2 anni fa
-1

CodeBuild doesn't offer a native capability to do parallel tasks. You could split up your tasks outside of CodeBuild to execute them in parallel, if that's an option for your use case. CodeBuild supports multiple input and output, both in standalone mode or when used with CodePipeline.

Documentation: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html and https://docs.aws.amazon.com/codebuild/latest/userguide/sample-pipeline-multi-input-output.html

AWS
Subin M
con risposta 5 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande