
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 B is correct because setting up a trigger in Cloud Build with the 'Push to a branch' event automates the build process whenever code is pushed to the branch, aligning with the requirement for minimal management overhead. Option A introduces unnecessary complexity and management overhead. Option C is incorrect because triggers are managed in Cloud Build, not Cloud Source Repository. Option D does not meet the requirement as it involves pull requests, which were not mentioned in the scenario. For more details, refer to Google Cloud's documentation on automating builds with triggers.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
As a Google Professional Cloud DevOps Engineer, you're designing an automated CI pipeline to build and push images to Container Registry. Currently, developers manually issue build commands after pushing code to the test branch. How can you automate the build process for the test branch with minimal management overhead?
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 'Push to a branch'
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 'Pull request'