reproducible build

A build that produces the same result every time from the same inputs.

In more detail

Reproducibility depends on pinned inputs, such as exact dependency versions, recorded tool versions and base images referenced by digest. It lets a problem seen on one machine be recreated on another and helps prove that what runs in production is what passed tests. Even so, promoting the tested artifact is safer than trusting a rebuild to match.

Examples

go build -trimpath -ldflags="-s -w" -o app .
The Maven Wrapper and pinned dependency versions keep the course build reproducible.
Rebuilding a virtual environment from a pinned requirements.txt gives the same packages byte for byte.
Pinning the zip entry timestamp to 1980-01-01 makes two builds byte-identical

Related terms

Taught in

References