
Answer-first summary for fast verification
Answer: Add a Cloud Build config file upon branch push. Create a trigger in Cloud Build for the 'Push new tag' event.
Option B is correct because it directly addresses the requirement to trigger builds on commits with specific tags using the 'Push new tag' event in Cloud Build, minimizing management overhead. Option A introduces unnecessary complexity. Option C incorrectly suggests using Cloud Source Repository for triggers. Option D does not meet the requirement for tag-specific commits. Reference: [Google 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 that triggers upon code commit to the Cloud Source Repository.
B
Add a Cloud Build config file upon branch push. Create a trigger in Cloud Build for the 'Push new tag' event.
C
Add a Cloud Build config file upon branch push. Create a trigger in Cloud Source Repository for the 'Push to a branch' event.
D
Add a Cloud Build config file upon branch push. Create a trigger in Cloud Build for the 'Pull request' event.