
Answer-first summary for fast verification
Answer: Create a build trigger on a Git tag pattern. Use a Git tag convention for new releases.
The goal is to automate releases for specific commits on the master branch. Option B is correct because Git tags are a standard way to mark specific commits (e.g., for releases). By creating a Cloud Build trigger that activates on a Git tag pattern (e.g., `v*`), new releases can be automatically built and deployed when a tag matching the pattern is pushed. This avoids manual intervention (A), does not rely on branch naming (C, which is already used for all commits to master), and eliminates redundant repository management (D). Tags provide a lightweight, version-controlled mechanism to trigger releases for specific commits.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you automate the release of specific commits to the master branch when using Cloud Build to create Docker images on each commit to a Cloud Source Repositories repository?
A
Manually trigger the build for new releases.
B
Create a build trigger on a Git tag pattern. Use a Git tag convention for new releases.
C
Create a build trigger on a Git branch name pattern. Use a Git branch naming convention for new releases.
D
Commit your source code to a second Cloud Source Repositories repository with a second Cloud Build trigger. Use this repository for new releases only.
No comments yet.