QuestionQ59

VerifiedSDLC Automation

A company uses an AWS CodeCommit repository to store its source code and related unit tests. The company has configured an AWS CodePipeline pipeline that includes an AWS CodeBuild project, which runs when code is merged into the repository’s main branch.

The company wants the CodeBuild project to execute the unit tests. If the tests pass, the CodeBuild project must tag the latest commit.

How should the company configure the CodeBuild project to meet these requirements?

Explanation

A Git tag labels a specific commit and must be created in a Git repository and pushed to CodeCommit with Git. AWS documents creating a tag with git tag and publishing it with git push; AWS CLI CodeCommit tagging instead adds AWS resource tags to the repository, not Git tags. A full Git clone also provides the Git metadata required for CodeBuild to perform Git operations.

Learn more

Community Discussion

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