Deploy MR and upstream review apps to Cloudflare Workers

What does this MR do?

Moves MR and upstream review apps from GitLab Pages to Cloudflare Workers. Each review app is its own Worker:

  • MRs: https://docs-review-mr-<iid>.gitlab-marketing.workers.dev
  • Upstream: https://docs-upstream-<REVIEW_SLUG>.gitlab-marketing.workers.dev

Changes:

  • Replace pages-review-apps with cloudflare-review-apps, plus a cloudflare-review-apps-stop job that deletes the Worker on merge, close, auto-stop (1 month), or upstream cleanup.
  • Build review apps with --baseURL set to the Worker URL. scripts/cloudflare-review-app-name.sh builds the name and makes it DNS safe.
  • Keep environment names, so upstream trigger-build.rb cleanup still works.
  • Brotli only for default branch builds.
  • Detect review apps with HUGO_PARAMS_REVIEWAPP instead of the path prefix, and load Pagefind from / on root builds.
  • cloudflare-test-deploy now runs on the default branch only.

Follow-ups

  • Update the review app URL printed by trigger-build.rb in gitlab.
  • Access policy (Zero Trust issue).

Related to https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/work_items/746

Merge request reports

Loading
Loading