Changed deploy-admin build to use sentinel placeholder for asset URLs#26393
Changed deploy-admin build to use sentinel placeholder for asset URLs#26393rob-ghost wants to merge 1 commit intofeat/production-docker-imagesfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ref https://linear.app/ghost/issue/BER-3300/ The deploy-admin job now builds with GHOST_CDN_URL=__GHOST_ASSET_URL__ instead of hardcoding the production CDN URL. The artifact is uploaded with the sentinel intact for Ghost-Moya to replace per-environment (production/staging). The production Docker build is unaffected — it omits GHOST_CDN_URL and gets relative paths naturally.
600e5f8 to
d134016
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/production-docker-images #26393 +/- ##
=================================================================
- Coverage 72.82% 72.81% -0.01%
=================================================================
Files 1561 1561
Lines 120778 120704 -74
Branches 14557 14539 -18
=================================================================
- Hits 87956 87893 -63
+ Misses 31809 31798 -11
Partials 1013 1013
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Phase 2 of 2: Sentinel-based admin asset URLs
ref https://linear.app/ghost/issue/BER-3300/
Depends on: https://github.com/TryGhost/Ghost-Moya/pull/128 (Phase 1 — must be merged first)
Ghost CI currently builds admin with the production CDN URL hardcoded (
https://assets.ghost.io/admin-forward/). Moya downloads this artifact and transforms it into a staging variant by swapping domains using a Node.js script with five npm dependencies. We're changing this so Ghost CI builds with a sentinel placeholder (__GHOST_ASSET_URL__) instead, and Moya replaces it per-environment with asedone-liner. This decouples the artifact from any specific environment URL.Full proposal: https://linear.app/ghost/issue/BER-3300/ (see attachment)
This PR (Phase 2 — merge after Phase 1)
Changes the
deploy_adminCI job fromGHOST_CDN_URL: https://assets.ghost.io/admin-forward/toGHOST_CDN_URL: __GHOST_ASSET_URL__. The uploaded artifact now contains the sentinel, which Moya's updated workflow (Phase 1) replaces with the correct production or staging URL.The production Docker image build is unaffected — it omits
GHOST_CDN_URLentirely and gets relative paths naturally.Single-line change.