Loading
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-appswithcloudflare-review-apps, plus acloudflare-review-apps-stopjob that deletes the Worker on merge, close, auto-stop (1 month), or upstream cleanup. - Build review apps with
--baseURLset to the Worker URL.scripts/cloudflare-review-app-name.shbuilds the name and makes it DNS safe. - Keep environment names, so upstream
trigger-build.rbcleanup still works. - Brotli only for default branch builds.
- Detect review apps with
HUGO_PARAMS_REVIEWAPPinstead of the path prefix, and load Pagefind from/on root builds. cloudflare-test-deploynow runs on the default branch only.
Follow-ups
- Update the review app URL printed by
trigger-build.rbingitlab. - Access policy (Zero Trust issue).
Related to https://gitlab.com/gitlab-org/technical-writing/docs-gitlab-com/-/work_items/746