Interview Prep/CI/CD/Fundamentals and Pipeline Design

What makes a build reproducible, and why does it matter?

AdvancedConceptFundamentals and Pipeline Design
Answer

A reproducible build produces the same output (ideally bit-for-bit identical) from the same source and inputs, no matter when or where it runs. It matters for debugging, rollbacks, audit and supply chain trust (you can verify a binary matches its source).

What breaks it: floating dependency versions, latest base images, timestamps embedded in artifacts, build-time network downloads, and differing toolchains on agents. What we do:

  • Pin dependencies with lockfiles (package-lock.json, poetry.lock, go.sum) and use npm ci.
  • Pin base images by digest (FROM node:22-slim@sha256:...).
  • Run builds in a pinned container image and set SOURCE_DATE_EPOCH.
  • Prefer hermetic tools such as Bazel or Nix for strict isolation.
All CI/CD questions Roadmap: CI/CD fundamentals

More on Fundamentals and Pipeline Design