
Answer-first summary for fast verification
Answer: Add a Cloud Build config file upon branch push and set up a trigger in Cloud Build for 'Push new tag' events.
Option B is correct because it directly addresses the requirement by automating builds upon commits with specific tags using the 'Push new tag' event in Cloud Build, thus minimizing management overhead. Option A introduces unnecessary complexity. Option C does not meet the specific requirement for tag-based triggers. Option D is irrelevant as it pertains to pull requests, not tag-based commits. Reference: [Cloud Build Documentation](https://cloud.google.com/build/docs/automating-builds/create-manage-triggers#build_trigger).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can you automate the CI pipeline for building and pushing images to Container Registry upon a commit with a specific tag, minimizing management overhead?
A
Create a cloud function triggered by commits to the Cloud Source Repository.
B
Add a Cloud Build config file upon branch push and set up a trigger in Cloud Build for 'Push new tag' events.
C
Add a Cloud Build config file upon branch push and set up a trigger in Cloud Source Repository for 'Push to a branch' events.
D
Add a Cloud Build config file upon branch push and set up a trigger in Cloud Build for 'Pull request' events.