Topic 1 Question 54
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?
Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
Create an Amazon EventBridge rule that reacts to the pullRequestCreated event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
Create an Amazon EventBridge rule that reacts to pullRequestCreated and pullRequestSourceBranchUpdated events. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
ユーザの投票
コメント(12)
- 正解だと思う選択肢: C👍 3Dimidrol2023/04/07
- 正解だと思う選択肢: C
C is right, because if source branch is updated, tests must be rerun. Badge is Faled/Success in codecommit in PR, to block PR if build failed.
👍 3ele2023/05/13 - 正解だと思う選択肢: D
D is likely the best answer for this scenario because it addresses the original requirement of automating testing of pull requests in CodeCommit and ensuring that reviewers see the results of automated tests as part of the pull request review. Option C reacts to pullRequestCreated and pullRequestSourceBranchUpdated events, but it also only posts the CodeBuild badge as a comment, which may not provide enough detail for reviewers to make an informed decision about the pull request.
based on the requirements of automating testing of pull requests in CodeCommit and ensuring that reviewers see the results of automated tests as part of the pull request review, D is the most suitable answer.
👍 2jqso2342023/04/14
シャッフルモード