Search code examples
amazon-web-servicesaws-codepipelineaws-codebuild

Why do AWS CodeBuild buildspec.yml support multiple build phases?


Why does the buildspec file support multiple build phases? install, pre_build, build, post_build? Am I doing something wrong if I put all of my build steps into a single phase? Is there something very useful, except for keeping some kind of structure, with these phases?


Solution

  • Failures in some phases will cause the build to exit, whilst others will not. This article spells it out pretty well: https://docs.aws.amazon.com/codebuild/latest/userguide/view-build-details.html#view-build-details-phases