How to Configure CI/CD for Automated Vertex AI Pipeline Retraining?

You developed a Vertex AI ML pipeline that consists of preprocessing and training steps and each set of steps runs on a separate custom Docker image. Your organization uses GitHub and GitHub Actions as CI/CD to run unit and integration tests. You need to automate the model retraining workflow so that it can be initiated both manually and when a new version of the code is merged in the main branch. You want to minimize the steps required to build the workflow while also allowing for maximum flexibility. How should you configure the CI/CD workflow?

  1. Trigger a Cloud Build workflow to run tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
  2. Trigger GitHub Actions to run the tests, launch a job on Cloud Run to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
  3. Trigger GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
  4. Trigger GitHub Actions to run the tests, launch a Cloud Build workflow to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines. Source Reference Answer

Community Votes

D
59%
C
41%

59% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The exam tests your ability to architect an optimal CI/CD pipeline for ML workloads, where the common trap is assuming that consolidating all steps into GitHub Actions inherently minimizes operational overhead.

This question evaluates best practices for integrating GitHub Actions with Google Cloud services to automate Vertex AI model retraining workflows while balancing simplicity and scalability. Community consensus favors leveraging Cloud Build for container operations to ensure robustness and flexibility beyond native GitHub Actions capabilities.

Many candidates select Option C because it appears simpler by handling image building directly in GitHub Actions, but this overlooks runner resource limits, lack of optimized caching, and reduced long-term scalability for production ML artifacts.

Community Discussion (18 comments)

pikachu007 👍 5 Selected: C
Considering the goal of minimizing steps while allowing for flexibility, option C - "Trigger GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines" appears to be the most straightforward approach. It leverages GitHub Actions for testing and image building, then directly triggers the Vertex AI Pipelines, simplifying the workflow and reducing unnecessary services involved in the process.
desertlotus1211 👍 1 Selected: C
Since your team already uses GitHub and GitHub Actions as part of your CI/CD process (including running unit and integration tests), it’s most efficient to extend your existing workflow to also handle the packaging and deployment of your ML pipeline It avoids introducing an extra services like (i.e. Run and Build)...
NamitSehgal 👍 1 Selected: D
Cloud Build is a dedicated service for building container images.
vini123 👍 1 Selected: D
Option D is the most suitable answer because it maximizes flexibility, optimizes the image creation process, and integrates well with the Vertex AI Pipelines workflow.
lunalongo 👍 2 Selected: C
C) GitHub Actions can directly build the Docker images, push them to Artifact Registry, and then trigger the Vertex AI pipeline execution. A&D) Add complexity by adding Cloud Build B) Adds Cloud Run for building/pushing Docker images, but GitHub Actions do this. See how: https://medium.com/@sbkapelner/building-and-pushing-to-artifact-registry-with-github-actions-7027b3e443c1
AB_C 👍 1 Selected: D
Maximum flexibility needed. Hence D, not C
bfdf9c8 👍 2 Selected: A
The correct answer is a. I think is tricky because D is posible, but add one step. and we want to minimize the steps.
AzureDP900 👍 1
option D might seem appealing at first, but it adds unnecessary complexity and makes it more challenging to manage the state of your pipeline. Option C, on the other hand, provides a simpler and more straightforward approach to automating your model retraining workflow using GitHub Actions.
AnnaR 👍 4 Selected: D
Not A: does not leverage the integration capabilities of GitHub Actions with GitHub for initial testing, which is more efficient when managing repo triggers and workflows directly from Github. Not B: Cloud Run for running stateless containers, not for CI/CD tasks like building and pushing images Not C: building docker images directly in github Actions can encounter limits in terms of build performance and resource availability, esp. for complex images
gscharly 👍 1 Selected: D
agree with guilhermebutzke
fitri001 👍 1 Selected: D
Security: GitHub Actions are ideal for running unit and integration tests within the controlled environment of your GitHub repository. This keeps your test code separate from the production pipeline code running in Cloud Build. Scalability and Resource Management: Cloud Build is a managed service specifically designed for building container images in Google Cloud. It offers better resource management and scalability for building Docker images compared to Cloud Run, which is primarily designed for running stateless containers. Flexibility: This configuration allows for independent scaling of test execution (in GitHub Actions) and image building (in Cloud Build). You can modify the workflow files in each platform independently without affecting the other.
pinimichele01 👍 1 Selected: D
i agree with guilhermebutzke
guilhermebutzke 👍 2 Selected: D
Choose D: GitHub Actions should be used to run tests and initiate the workflow upon code merges. Then, Cloud Build is a suitable service for building Docker images and handling the subsequent steps of pushing the images to Artifact Registry. So, Vertex AI Pipelines can be launched as part of the Cloud Build workflow for model retraining. In A Using Cloud Build directly from GitHub Actions would bypass GitHub Actions' capabilities for triggering and testing. In B, Cloud Run for building Docker images can introduce potential compatibility issues with Vertex AI Pipelines. In C, Skipping Cloud Build for image building limits the workflow's portability and integration with Vertex AI. https://cloud.google.com/vertex-ai/docs/pipelines/introduction https://medium.com/@cait.ray13/serving-ml-model-using-google-pub-sub-python-f569c46e7eb0
mindriddler 👍 2 Selected: C
It has to be C. Therese no need to use both GH Actions and Cloud Build when GH Actions can do it all by itself
shadz10 👍 3 Selected: D
D https://cloud.google.com/build/docs/building/build-containers https://cloud.google.com/build/docs/build-push-docker-image
36bdc1e 👍 2
The best approach would be Option C. By triggering GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines, you can automate the model retraining workflow. This approach allows for maximum flexibility and minimizes the steps required to build the workflow.
b1a8fae 👍 2 Selected: C
I am torn between C and D. GitHub actions to run the tests is definitely the simplest. Cloud Build allows to access fully managed CI/CD workflow (you could setup the Docker build job), but I figure it would be easier to do it from GitHub actions directly (https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) which allows you to use 1 tool less and achieve the same result.
BlehMaks 👍 2 Selected: D
i think it's D

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option D correctly delegates Docker image building and pushing to Artifact Registry to Cloud Build, a purpose-built managed service optimized for secure, scalable container operations in Google Cloud. Triggering Cloud Build from GitHub Actions maintains tight repository-level control for testing while offloading compute-intensive packaging tasks to a specialized platform. This hybrid architecture aligns with Google’s recommended MLOps patterns, ensuring Vertex AI Pipelines launch uses consistently versioned images without exhausting runner timeouts [Comment 2, 15].

Why the Other Options Are Wrong

Option A bypasses GitHub Actions entirely for initial triggers, breaking the seamless merge-to-main workflow the organization already standardized. Option B incorrectly proposes using Cloud Run for stateless execution rather than container building, which fundamentally misaligns with CI/CD pipeline design. Option C, while straightforward, forces shared GitHub runners to handle resource-heavy Docker builds, risking performance bottlenecks and limiting future flexibility for complex training dependencies [Comment 4, 6, 14].

Community Comment Notes

The discussion heavily revolves around immediate setup simplicity versus enterprise-grade scalability, with many initially leaning toward Option C before reviewing architectural trade-offs. Multiple contributors note that while GitHub Actions supports container builds natively, it lacks the advanced caching, parallelization, and IAM integrations that Cloud Build delivers seamlessly [Comment 2, 9, 11]. Ultimately, the voting shift toward D reflects a deeper understanding of how managed build services integrate more reliably with Vertex AI Pipelines at scale.

Official Reference

Exam Strategy

When comparing CI/CD architectures for Google Cloud ML workloads, prioritize dedicated managed services like Cloud Build for container operations over self-hosted runners to guarantee scalability and security. Always interpret "minimize steps" as reducing long-term maintenance overhead rather than just initial configuration count, especially when "maximum flexibility" is explicitly required.

Related Analysis

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide