QuestionQ16

SDLC Automation

A company is implementing a CI/CD pipeline for an application using AWS CodePipeline and AWS CodeBuild. The company requires a solution to run unit tests and automatically create code coverage reports before any code is deployed to production. The CI/CD pipeline execution must fail when code coverage is below 80%.

Which solution meets these requirements?

Explanation

An AWS CodeBuild test action runs the commands defined in buildspec.yml against its input source artifact. The buildspec can run unit tests, produce code coverage reports, and explicitly exit with a failure status when coverage is less than 80%. A failed CodeBuild action fails the pipeline execution, preventing a subsequent production deployment.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!