Teams need review apps for every MR and auto-stop when the MR closes.

IntermediateScenarioGitLab CI
Answer

Situation read → Dynamic environments.

What I'd do →

review:
  script: ./deploy-review.sh $CI_ENVIRONMENT_SLUG
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    url: https://$CI_ENVIRONMENT_SLUG.review.example.com
    on_stop: stop_review
    auto_stop_in: 3 days
  rules: [{ if: $CI_PIPELINE_SOURCE == "merge_request_event" }]
stop_review:
  script: ./teardown.sh $CI_ENVIRONMENT_SLUG
  environment: { name: review/$CI_COMMIT_REF_SLUG, action: stop }
  when: manual

Why → auto_stop_in and on_stop prevent orphaned environments.

Interview tip → Always pair environment creation with a stop path.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI