Learn to create a feature branch, submit a Merge Request in GitLab, and observe Auto DevOps pipeline stages for MR workflows.
In this lesson, you’ll learn how to create a feature branch, submit a Merge Request (MR) in GitLab, and observe how Auto DevOps adapts its pipeline stages for MR workflows. By the end, you’ll see Review and Cleanup stages in action and understand how to inject CI/CD variables into review environments.
1. Inspect the Initial Auto DevOps Pipeline on main
Once Auto DevOps is enabled, the pipeline for main runs standard stages—Build, Test, Production, and Performance—though the Build stage may be canceled if it’s already succeeded elsewhere:
A new pipeline runs on your feature branch. In addition to Build, Test, Production (swapped for Review), and Performance, you’ll see Review and Cleanup stages:
> mocha app-test.js --timeout 10000 --reporter mocha-junit-reporter --exitMongooseError: The uri parameter to `openUri()` must be a string, got "undefined".Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string.
The error indicates that MONGO_URI (and related credentials) are not defined in CI.
kubectl get all -n defaultkubectl describe pod review-feature-auto-devops-xxxxx -n defaultkubectl logs review-feature-auto-devops-xxxxx -n default
You may see the same Mongoose error, which means the pod lacks the CI/CD environment variables:
Copy
Ask AI
MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined".
Environment variables defined in GitLab CI/CD are not automatically injected into Kubernetes pods. To pass them, configure your Helm chart’s values.yaml or use GitLab’s Review App variables documentation.
Because the pod fails to start, the Review job times out and a Cleanup stage is triggered:
Up next, we’ll explore how to inject CI/CD variables into your Helm chart so that Review Apps can connect to external services like MongoDB.