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 →
- Build once and record the digest:
crane digest $IMAGE:$TAGand store it inenv.IMAGE_DIGESTand the build description. - Deploy to staging and prod by digest (
image@sha256:...). - Optionally copy/tag the image into a prod registry with
crane copywithout rebuilding. - 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.
More on Integrations & delivery
The SonarQube quality gate step waits until timeout on every build, even though analysis completes. Design the correct integration.IntermediateYou need to publish Java artifacts: snapshots on every `main` build, releases on tags. Design with Nexus.IntermediateDevelopers want to deploy to Kubernetes from Jenkins, but security does not want cluster-admin kubeconfigs in Jenkins. What do you propose?AdvancedTrivy blocks a release because of a HIGH CVE in a base image package with no fix available. Business wants to ship. What do you do?IntermediateImage builds take 9 minutes in Kubernetes pods because nothing is cached. How do you add caching with Kaniko?IntermediateYour SonarQube analysis must decorate PRs with comments and fail PR builds on new issues only. How do you configure the pipeline?Advanced