Courseiva

PMLE Automating and Orchestrating ML Pipelines Practice Question

A team uses Cloud Build to automatically trigger a Vertex AI pipeline when changes are pushed to the model code repository. They have a cloudbuild.yaml file that builds a container image and submits the pipeline. However, they want to run the pipeline only if the commit includes changes to the 'training/' directory. Which Cloud Build configuration option should be used to filter the trigger?

⚠ Common exam trap

It's easy for candidates to confuse `ignoreFiles` with `includedFiles`, or assume that a custom solution like Cloud Functions is required when Cloud Build already provides a native, simpler mechanism for path-based filtering.

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 the 'includedFiles' field to 'training/**' in the trigger configuration.

Cloud Build triggers support an `includedFiles` field that specifies a glob pattern. When set to `training/**`, the trigger will only fire if the commit includes changes to files under the `training/` directory. This is the native, declarative way to filter triggers based on changed file paths without additional infrastructure.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Add a 'ignoreFiles' field with 'training/**' to the trigger.

    Why it's wrong here

    Adding `ignoreFiles: training/**` inverts the requirement: it fires the build whenever anything *outside* `training/` changes, and skips commits touching only that directory. The `ignoreFiles` field exists to suppress builds for paths such as documentation or README edits, so it would be the right choice only if `training/` changes should never trigger the pipeline.

  • ✗

    Use a 'substitutions' field with a regex pattern to filter commits.

    Why it's wrong here

    Substitutions supply variable values consumed by the build steps; they cannot evaluate which repository paths a push touched, so no regex there gates the trigger. Substitutions are for injecting environment-specific values such as image tags or project IDs into cloudbuild.yaml.

  • ✗

    Configure a Cloud Function to check the commit diff and call Cloud Build API conditionally.

    Why it's wrong here

    A Cloud Function inspecting commit diffs adds an external component and latency, whereas Cloud Build triggers natively support includedFiles path filtering. The Cloud Function pattern fits orchestrating cross-service logic that Cloud Build triggers cannot express.

  • ✓

    Set the 'includedFiles' field to 'training/**' in the trigger configuration.

    Why this is correct

    The includedFiles field with 'training/**' restricts the trigger to commits touching that directory, directly satisfying the requirement to run the pipeline only for training-code changes. Cloud Build evaluates this glob against changed paths before executing cloudbuild.yaml, avoiding unnecessary builds.

About these practice questions

Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.