$linuxjunkies
>

bake then deploy

also: immutable artifact deployment, build once, deploy everywhere

A deployment pattern where application code is compiled, tested, and packaged into a complete, immutable artifact (the "bake") before being deployed to production servers (the "deploy"). This contrasts with deploying source code and compiling on the target system.

The "bake then deploy" pattern separates the build process from the deployment process. During the "bake" phase, source code is compiled, dependencies are resolved, tests are run, and the application is packaged into a single immutable artifact—typically a container image, binary, or compiled package. This artifact is then deployed to production without any further compilation or configuration changes.

This approach improves reliability because the artifact tested in staging is identical to what runs in production, eliminating "it works on my machine" problems. For example, you might build a Docker image containing a compiled Go application, verify it passes all tests, then deploy that same image to multiple servers, knowing the behavior will be identical everywhere.

Bake then deploy also enables faster deployments and easier rollbacks, since you're moving pre-built artifacts rather than waiting for compilation on each target system. It's a core principle of immutable infrastructure and continuous deployment pipelines.

Related terms