Build once, deploy anywhere
Each environment got its own build, so what reached production was not the package that passed QA. I led one packaging model for ECS, EKS, Lambda and frontends, from design to implementation, where TeamCity builds a package once and the internal deployment system adds the environment config at deploy time.
35 services now build once in TeamCity and 25 deploy with the internal deployment system. P95 deployment time fell by 8 minutes 41 seconds.
- 35services building once in TeamCity
- 25services on the internal deployment system
- 8m 41soff P95 deployment time
Context
Teams built a new package just before a production release. Vue 3 builds took 5 to 6 minutes and older Vue 2 builds took 14 to 32 minutes. One feature took up to 96 minutes to build for 3 environments.
What I did
- Set up TeamCity to build one package per change.
- Moved environment config to deploy time in the internal deployment system: environment variables for ECS, Nuxt runtime config and a config folder kept apart from the public files for single page apps.
- Gave a 30 minute tech talk on the frontend version in March 2025, “Environment-agnostic web apps: Build once, Deploy Anywhere”.
Numbers
- P95 deployment time went from 49 minutes 37 seconds down by 8 minutes 41 seconds.
Diagrams
Source repository
One build
QA
Production
Source repository
QA build
Production build
QA
Production