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!

preguntada hace 5 años1592 visualizaciones
3 Respuestas
1

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

respondido hace un año
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.

respondido hace 2 años
-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
respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas