SDLC Automation
22% of the examWhat this topic covers
Build CI/CD pipelines that run unit tests and stop deployments when tests fail. Manage versioned artifacts, pin ECR images by digest, and choose deployment methods for instances, containers, and serverless workloads.
What makes a failing unit test stop a CodePipeline deployment?
The build stage must return a nonzero exit code when a unit test fails. CodePipeline then marks that action failed, so no deployment action runs. Put the test command in the buildspec file, and do not hide its exit status with a command that always succeeds.