
Answer-first summary for fast verification
Answer: Add a cloud build config file when code is pushed to the branch. Create a trigger in Cloud Build and select the event 'Push to a branch'.
Option D is the correct choice because it involves creating a trigger in Cloud Build with the 'Push to a branch' event, which automates the build process upon code push to the branch with minimal overhead. Option A introduces unnecessary management overhead. Option B is incorrect as it involves a 'Pull request' event, not specified in the requirement. Option C is incorrect because triggers are not created in Cloud Source Repository but in Cloud Build. Reference: https://cloud.google.com/build/docs/automating-builds/create-manage-triggers#build_trigger
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you automate the build process for the test branch in a CI pipeline with minimal management overhead when developers push code to it?
A
Create a cloud function that is triggered when code is committed to the cloud source repository.
B
Add a cloud build config file when code is pushed to the branch. Create a trigger in Cloud Build and select the event 'Pull request'.
C
Add a cloud build config file when code is pushed to the branch. Create a trigger in Cloud Source Repository and select the event 'Push to a branch'.
D
Add a cloud build config file when code is pushed to the branch. Create a trigger in Cloud Build and select the event 'Push to a branch'.
No comments yet.