DOP-C02 · Question #18
A development team uses AWS CodeCommit for version control for applications. The development team uses AWS CodePipeline, AWS CodeBuild. and AWS CodeDeploy for CI/CD infrastructure. In CodeCommit…
The correct answer is C. Create an Amazon EventBridge rule that reacts to pullRequestCreated and. A pull request is just a branch that the requestor is asking to be merged in master/main. When you create a pull request you set the branch, that is the start, you have to use the current contents of the branch to execute the tests. When time passes developers add commits to…
Question
A development team uses AWS CodeCommit for version control for applications. The development team uses AWS CodePipeline, AWS CodeBuild. and AWS CodeDeploy for CI/CD infrastructure. In CodeCommit, the development team recently merged pull requests that did not pass long-running tests in the code base. The development team needed to perform rollbacks to branches in the codebase, resulting in lost time and wasted effort. A DevOps engineer must automate testing of pull requests in CodeCommit to ensure that reviewers more easily see the results of automated tests as part of the pull request review. What should the DevOps engineer do to meet this requirement?
Options
- ACreate an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create
- BCreate an Amazon EventBridge rule that reacts to the pullRequestCreated event. Create an AWS
- CCreate an Amazon EventBridge rule that reacts to pullRequestCreated and
- DCreate an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create
How the community answered
(15 responses)- B13% (2)
- C80% (12)
- D7% (1)
Explanation
A pull request is just a branch that the requestor is asking to be merged in master/main. When you create a pull request you set the branch, that is the start, you have to use the current contents of the branch to execute the tests. When time passes developers add commits to that branch or force-push it, changing the contents of the PR's branch. That is the moment in which you have to trigger the tests. The PR comments and discussions may change, but that does not change the code so no need to perform new tests. You only test when the PR is created and every time the branch is pushed (updated). https://aws.amazon.com/ru/blogs/devops/validating-aws-codecommit-pull-requests-with-aws- codebuild-and-aws-lambda/
Topics
Community Discussion
No community discussion yet for this question.