A team wants every push to the production branch of its Git repository to start a Cloud Build run that tests and deploys the pipeline code, with no manual step. Which trigger configuration should they use?
Show answer and explanation
Answer: D
Cloud Build push triggers start a build whenever a commit is pushed to a branch matching the trigger's filter, so a filter on the production branch runs the pipeline code on each push there. This gives continuous integration and deployment without an operator. Manual, scheduled, and pull request triggers each start builds on different events and would not run on every push to production.
Why the other options are wrong
- A. Manual triggers run only when someone starts them, which violates the no-manual-step requirement. They do not respond to pushes at all.
- B. A nightly schedule runs whether or not anything changed and can miss pushes made during the day. It is a timer, not a push-driven integration.
- C. Pull request triggers respond to proposed merges, not to commits landing on production. They can run checks before a merge, but they do not fire on each push to the production branch.