14/71
Sign inSign up free

813. Manual Production Deploys in GitLab CI

medium 20 XP ~10 minHands-on lab

/home/student/repos/auth-gateway/.gitlab-ci.yml deploys profile to staging and production on every push, from every branch.

Task

JobEnvironmentURLWhen
deploy_stagingstaginghttps://staging.profile.example.comautomatically
deploy_productionproductionhttps://profile.example.comonly when someone starts it by hand

Also:

  • both deploy jobs exist only in pipelines for the default branch (don't hard-code its name); build still runs everywhere,
  • until someone starts deploy_production, the pipeline must show as blocked, not as passed,
  • two production deployments must never run at the same time (use a resource group called production).

Keep the stages and scripts.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.