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!

demandé il y a 5 ans1592 vues
3 réponses
1

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

répondu il y a un an
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.

répondu il y a 2 ans
-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
répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions