Interview Prep/Jenkins/Integrations & delivery

A pipeline should promote the exact image that passed staging to production, not a rebuild. How do you guarantee it?

IntermediateScenarioIntegrations & delivery
Answer

Situation read → Immutable artifact promotion.

What I'd do →

  1. Build once and record the digest: crane digest $IMAGE:$TAG and store it in env.IMAGE_DIGEST and the build description.
  2. Deploy to staging and prod by digest (image@sha256:...).
  3. Optionally copy/tag the image into a prod registry with crane copy without rebuilding.
  4. Prod deploy job takes the digest as a parameter, verifies the signature.

Why → Digests are immutable; tags can be overwritten.

Interview tip → Say "same digest in every environment" explicitly.

All Jenkins questions Roadmap: Jenkins

More on Integrations & delivery