How to deploy Vertex AI Pipelines safely using CI/CD?

You recently deployed a pipeline in Vertex AI Pipelines that trains and pushes a model to a Vertex AI endpoint to serve real-time traffic. You need to continue experimenting and iterating on your pipeline to improve model performance. You plan to use Cloud Build for CI/CD You want to quickly and easily deploy new pipelines into production, and you want to minimize the chance that the new pipeline implementations will break in production. What should you do?

  1. Set up a CI/CD pipeline that builds and tests your source code. If the tests are successful, use the Google. Cloud console to upload the built container to Artifact Registry and upload the compiled pipeline to Vertex AI Pipelines.
  2. Set up a CI/CD pipeline that builds your source code and then deploys built artifacts into a pre-production environment. Run unit tests in the pre-production environment. If the tests are successful deploy the pipeline to production.
  3. Set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, deploy the pipeline to production. Source Reference Answer
  4. Set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, rebuild the source code and deploy the artifacts to production.

Community Votes

C
100%

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

Community Insight

The question tests the necessity of integration testing (running the actual pipeline) over simple unit testing to validate end-to-end functionality before production deployment.

To minimize production breakage when iterating on Vertex AI Pipelines, implement a CI/CD workflow that validates code in a pre-production environment via a full pipeline run before promoting to production.

Selecting Option B is a frequent error because it relies solely on unit tests, which fail to catch runtime errors specific to the pipeline execution environment.

Community Discussion (5 comments)

fitri001 👍 2 Selected: C
CI/CD Pipeline: This automates the build, test, and deployment process, enabling faster iterations and reducing manual errors. Pre-production Environment: Deploying to a pre-production environment (staging) allows you to test the new pipeline functionality with simulated real-world data. This helps identify and fix potential issues before impacting production. Successful Pipeline Run: Verifying a successful run in the pre-production environment provides confidence that the new pipeline functions as expected.
pinimichele01 👍 1 Selected: C
Unit test is insufficient, there should be a pipeline run.
ddogg 👍 3 Selected: C
C. Pre-production environment: Deploying to a pre-production environment before production allows you to thoroughly test the new pipeline's functionality and performance without affecting real-time traffic. Successful pipeline run: This ensures the entire pipeline executes correctly in the pre-production environment, including training, model pushing, and endpoint deployment. No rebuild in production: Rebuilding the source code after a successful pre-production run is unnecessary and adds an extra step that could potentially introduce new errors.
36bdc1e 👍 1
C The best option for continuing experimenting and iterating on your pipeline to improve model performance, using Cloud Build for CI/CD, and deploying new pipelines into production quickly and easily, is to set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, deploy the pipeline to production. This option allows you to leverage the power and simplicity of Cloud Build to automate, monitor, and manage your pipeline development and deployment workflow.
pikachu007 👍 2 Selected: C
C. Set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, deploy the pipeline to production. A - Does not have pre-production environment. B - Unit test is insufficient, there should be a pipeline run. D - (Uncertain) but there's shouldn't be a rebuilding as you have already built and tested successfully, feels redundant to rebuild.

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 C is the optimal solution because it automates the build and test process, deploys artifacts to a pre-production environment, and critically, requires a successful pipeline run in that environment. This step acts as an integration test, verifying that the entire workflow—including model training and deployment—functions correctly without impacting real-time traffic. Promoting the same artifacts to production ensures consistency and minimizes the risk of failure.

Why the Other Options Are Wrong

Option A is incorrect because it relies on manual uploads via the Google Cloud console, which is inefficient and prone to human error, violating the goal of a quick and easy CI/CD process. Option B is insufficient because running only unit tests in pre-production does not validate the pipeline's runtime logic or interactions with Vertex AI services. Option D introduces unnecessary risk and latency by rebuilding the source code before production deployment, which could result in different artifacts than those tested in staging.

Community Comment Notes

Community members strongly emphasized that unit tests are not sufficient for validating machine learning pipelines, advocating instead for a full pipeline run in a staging environment (Comments 3, 4). There was a clear consensus that Option C provides the necessary balance of automation and safety by validating the pipeline execution before production release (Comments 1, 2). Additionally, users noted that the redundant rebuild step in Option D is an anti-pattern that should be avoided (Comment 3).

Official Reference

Exam Strategy

For MLOps scenario questions, always prioritize options that include a staging or pre-production environment with a full execution test over those that rely solely on unit testing or manual steps.

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