Frontend platform
Artifact promotion
Build once, promote everywhere
One tested build, promoted to every environment, with URLs resolved at runtime instead of baked in at build time.
The problem
Every frontend on the platform was built separately for each environment, with URLs and configuration fixed at build time. Promoting a release meant rebuilding it, so the code running in production was never exactly the artifact QA had tested in staging.
My role
I worked with one partner and took full ownership of the frontend side: moving every frontend client to promotable artifacts, and designing and publishing the shared URL resolution library they all depend on.
The decision
Move configuration from build time to runtime. Each app now asks a config service for its settings when it starts, and the service fills in the right URLs based on the domain the browser is on. Any environment can serve the same artifact.
I designed a shared library that every frontend client and shared package uses to build URLs. On startup, the app sets it up with the environment it received from the config service. If no environment is provided, the library works it out from the domain itself, so it stays correct even where the app hasn’t set it up.
The tradeoff
Runtime configuration adds a blocking request to every app’s startup. I accepted that on purpose. The request is small with a tiny payload, and if it failed, the app would very likely have failed anyway. One small, predictable request at startup was worth getting rid of a separate build for each environment.
Shipping it safely
- Rollback. A feature flag let each client switch between fetching configuration at runtime and its previous build-time values.
- Release checks. Automated checks verified that no hardcoded URLs remained: the kind of bug that makes one artifact behave differently from one environment to the next.
- Migration. With a flag per client and a library that worked with or without the config service, clients moved over one at a time. No coordinated cutover was needed.
What changed
- Every frontend client across the organization ships as one immutable artifact, and promotion reuses the exact build that was tested.
- The shared URL library supports multi-region and ephemeral deployments without a rebuild.