
Answer-first summary for fast verification
Answer: Include a cloud build configuration file upon branch push. Set up a Cloud Build trigger for the 'Push new tag' event.
The optimal solution involves setting up a Cloud Build trigger for the 'Push new tag' event, which automatically initiates a build when commits include a specific tag. This approach directly addresses the requirement without unnecessary overhead. Other options either misalign with the specific need for tag-based triggers or introduce additional management complexity. Reference: Build trigger documentation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Imagine you're designing an automated CI pipeline to build and push images to ContainerRegistry upon a commit with a specific tag. Currently, developers manually issue build commands after pushing code to the test branch. What's the most efficient way to automate this process with minimal management overhead?
A
Implement a cloud function that activates upon code commit to the cloud source repository.
B
Include a cloud build configuration file upon branch push. Set up a Cloud Build trigger for the 'Pull request' event.
C
Include a cloud build configuration file upon branch push. Set up a Cloud Build trigger for the 'Push new tag' event.
D
Include a cloud build configuration file upon branch push. Establish a trigger in Cloud Source Repository for the 'Push to a branch' event.
No comments yet.