Artifact Promotion (Build Once)
As a Fresher engineer, explain Artifact Promotion (Build Once). What problem does it solve and how would you describe it in an interview?
Answers use simple, clear English.
Audio N/AQuick interview answer
At Fresher depth: start with the problem, then mechanism, then a short example. Build a versioned image/package once in CI; promote the same digest through staging→prod.
Detailed answer
At Fresher depth: start with the problem, then mechanism, then a short example. Build a versioned image/package once in CI; promote the same digest through staging→prod. Never rebuild for prod with different flags. Core: Build a versioned image/package once in CI; promote the same digest through staging→prod. Never rebuild for prod with different flags. Real-time example: CI pushes ghcr.io/app:sha-abc; staging and prod both pull sha-abc. Pros: What you tested is what you ship. Cons: Needs good registry + digest pinning. Common mistakes: latest tag in prod; rebuilding on deploy job. Best practices: Pin by digest; SBOM; sign images (cosign). Audience level: Fresher.
Full explanation
Build a versioned image/package once in CI; promote the same digest through staging→prod. Never rebuild for prod with different flags.
Real example & use case
CI pushes ghcr.io/app:sha-abc; staging and prod both pull sha-abc.
Pros & cons
Pros: What you tested is what you ship. Cons: Needs good registry + digest pinning.
Common mistakes
latest tag in prod; rebuilding on deploy job.
Best practices
Pin by digest; SBOM; sign images (cosign).
Follow-up questions
Only answered follow-ups are shown — click to open with full answers