Comparison
Artefact promotionvsBuild once, deploy many
Artefact promotion
the same version moves from staging to production by changing a reference, and no build runs to make that happen.
Advancing a specific artefact version through a sequence of environments as it earns confidence. It makes the question 'what is in production' answerable and gives rollback an obvious target — the version that was there before. Where promotion is implemented as a rebuild from a branch, none of those properties hold, which is the main practical reason branch-per-environment schemes go wrong.
Full entry →Build once, deploy many
the exact bytes tested in staging are the bytes that run in production, with only the configuration differing.
The rule that an artefact is built exactly once and then promoted unchanged through environments, with environment differences supplied as configuration at run time. It is what gives testing in a lower environment any evidential value. Breaking it is usually accidental — an environment-specific build argument, a rebuild triggered by the deploy job — and the consequence is that every environment is a separate, untested thing.
Full entry →