
Explanation:
The correct approach involves setting up a Cloud Build trigger for 'Push new tag' events, which automates the build process when developers commit code with a specific tag. This method directly addresses the requirement with minimal overhead. Other options either involve incorrect trigger events (like 'Pull request' or 'Push to a branch') or introduce unnecessary management complexity, such as using a cloud function for this specific scenario. For more details, refer to the Build trigger documentation.
Ultimate access to all questions.
No comments yet.
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 is the most efficient way to automate this build process with minimal management overhead?
A
Implement 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 Cloud Build trigger for 'Pull request' events.
C
Add a cloud build config file upon branch push and configure a Cloud Source Repository trigger for 'Push to a branch' events.
D
Add a cloud build config file upon branch push and establish a Cloud Build trigger for 'Push new tag' events.