Courseiva

PMLE Automating and Orchestrating ML Pipelines Practice Question

A team is implementing CI/CD for ML using Cloud Build. They want to trigger a training pipeline in Vertex AI whenever a new model code is pushed to the main branch of the repository. Which Cloud Build configuration should they use to achieve this?

⚠ Common exam trap

Google often tests the candidate's understanding that Cloud Build triggers can be scoped to specific branches and that using gcloud directly in a build step is the simplest and most efficient way to invoke Vertex AI Pipelines, rather than introducing unnecessary intermediate services like Cloud Functions or Scheduler.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Set up a Cloud Build trigger that runs on push to main branch, and in the build step, use gcloud to submit a Vertex AI Pipeline job.

Cloud Build triggers can be configured to fire specifically on pushes to the main branch. The build step then uses the gcloud command to submit a Vertex AI Pipeline job, which directly integrates the CI/CD pipeline with Vertex AI's orchestration. This approach is event-driven, immediate, and requires no additional services or polling.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Set up a Cloud Build trigger that runs on push to any branch, and in the build step, use gcloud to submit a Vertex AI Pipeline job.

    Why it's wrong here

    Triggering on any branch runs the pipeline for commits outside main, so training fires on feature branches and violates the stated condition. A trigger filtered to the main branch satisfies the requirement; any-branch triggers suit workflows needing validation across all branches before merge.

  • ✗

    Use a Cloud Scheduler job to periodically check for new commits on main and trigger Cloud Build.

    Why it's wrong here

    Polling on a schedule introduces latency and misses the push event entirely, so training would not start when code lands on main. Cloud Scheduler suits recurring batch jobs, such as nightly retraining, not event-driven CI/CD triggers tied to repository commits.

  • ✗

    Use Cloud Functions to watch the repository and call Cloud Build on push to main.

    Why it's wrong here

    Cloud Functions can receive repository webhooks, but this adds a custom intermediary instead of using Cloud Build's native trigger mechanism, which already subscribes to source repositories. Cloud Functions fits lightweight glue logic where no built-in trigger exists, not this direct push-to-build requirement.

  • ✓

    Set up a Cloud Build trigger that runs on push to main branch, and in the build step, use gcloud to submit a Vertex AI Pipeline job.

    Why this is correct

    A Cloud Build trigger scoped to pushes on the main branch fires the build, and a gcloud step submits the Vertex AI Pipeline job. This satisfies the stem's constraint that training be triggered specifically by new model code pushed to main.

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.