Skip to main content

Associate Cloud Engineer practice question · Planning and implementing a cloud solution

A team wants every commit pushed to the main branch of their source repository to automatically start a Cloud Build…

A team wants every commit pushed to the main branch of their source repository to automatically start a Cloud Build pipeline that runs tests and builds a container image. Nobody should have to start the build by hand. What should they configure?

  • AA Cloud Build trigger on the repository using the "Push to a branch" event
  • BA Cloud Scheduler job that runs gcloud builds submit every few minutes
  • CA cloudbuild.yaml file committed to the root of the repository
  • DA manual trigger that developers run with gcloud builds triggers run
Show the answer and explanation

Correct answer: A) A Cloud Build trigger on the repository using the "Push to a branch" event

Cloud Build triggers watch for repository events such as a push to a branch and automatically start the configured build. Build config files, scheduled jobs and manual triggers don't provide event-driven automation.

Why each option is right or wrong

  • A) Correct. A Cloud Build trigger listens for repository events, such as a new commit pushed to a branch matching a pattern, and automatically starts the build defined in its build configuration.
  • B) Incorrect. This runs builds on a timer, not when a commit is pushed. It would start builds when nothing has changed and could miss individual commits. Triggers are the event-driven mechanism built for this.
  • C) Incorrect. A build config file defines the build steps, but it doesn't start a build by itself. A trigger (or a manual submission) is still needed to run it.
  • D) Incorrect. A manual trigger only runs when someone invokes it, so it doesn't meet the requirement that builds start automatically on each push.
Exam domain
Planning and implementing a cloud solution · ~30% of Associate Cloud Engineer
Question type
Multiple choice (one answer)

Practise the full Associate Cloud Engineer exam

This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.