Build-Once, Promote-Everywhere
What This Concept Is
A single immutable artifact is built from a given commit once, tested in that form, and then promoted -- unchanged -- through every environment on its way to production. Configuration varies per environment; the artifact does not.
The slogan has three parts:
- Build once. One source commit, one build, one tagged artifact (e.g.
app:a1b2c3d). - Promote everywhere. The same bytes go to dev -> staging -> production.
- Configure at runtime. Environment differences (database URLs, feature flags, secrets) are injected as configuration, not compiled in.
The alternative -- rebuilding the artifact at each environment -- means "the thing we tested" is not "the thing we shipped." You gave up reproducibility at the first rebuild. This is why The Twelve-Factor App devotes a full factor (III -- Config) to the separation of config from code: config must live outside the artifact and vary per environment, while the artifact is byte-identical across all of them.