Problem Statement: Environment Promotion Pipeline
How Problem Statement: Environment Promotion Pipeline (understanding) informs Environment Promotion architecture and interviewer depth.
Problem Statement: Environment Promotion Pipeline
Design a central promotion control plane that moves immutable artifacts (container digests, signed OCI images, locked Helm/OCI chart versions) from dev → staging → production with monotonically stricter gates—the pattern Netflix Spinnaker, Argo CD, and Jenkins promotion plugins implement at scale.
Interviewers are testing whether you rebuild in prod (anti-pattern) or advance the same bits that already earned evidence in lower tiers.
Problem framing
- Build once: CI produces digest + attestations; lower tiers never recompile for prod.
- Gate each hop with automated checks; prod adds human approval and change windows.
- Environment overlays patch config/secrets; image reference stays immutable.
- Audit trail links git SHA, build id, digest, approver, executor deployment id.
Design choices
- Central catalog is source of truth for digest eligibility.
- Policy engine fail-closed on missing gate evidence.
- Executors are pluggable; never embed Spinnaker logic in API.
Deep dive
Spinnaker models pipelines with stages; Argo models desired state in git; Jenkins models parameterized jobs. Your answer unifies them with catalog + policy + audit so interviewers see platform thinking—not tool advocacy.
1 public final class PromotionPolicy { 2 public boolean mayPromote(String fromEnv, String toEnv, String digest, GateReport report) { 3 if ("prod".equals(toEnv) && !report.stagingSoakMet(digest)) return false; 4 if ("prod".equals(toEnv) && !report.approvalsComplete()) return false; 5 return report.testsPassed() && report.policyChecksPassed(); 6 } 7 }
1 from dataclasses import dataclass 2 from enum import Enum 3 4 class PromotionStatus(Enum): 5 REQUESTED = "requested" 6 AWAITING_APPROVAL = "awaiting_approval" 7 EXECUTING = "executing" 8 SUCCEEDED = "succeeded" 9 FAILED = "failed" 10 11 @dataclass 12 class PromotionRequest: 13 service_id: str 14 digest: str 15 from_env: str 16 to_env: str 17 idempotency_key: str 18 19 def next_state(current: PromotionStatus, approved: bool) -> PromotionStatus: 20 if current is PromotionStatus.REQUESTED and approved: 21 return PromotionStatus.EXECUTING 22 if current is PromotionStatus.REQUESTED: 23 return PromotionStatus.AWAITING_APPROVAL 24 return current
1 interface PromotionMatrixEntry { 2 serviceId: string; 3 environment: "dev" | "staging" | "prod"; 4 digest: string; 5 deployedAt: string; 6 } 7 8 export function isEligibleForProd(entry: PromotionMatrixEntry, stagingDigest: string): boolean { 9 return entry.environment === "staging" && entry.digest === stagingDigest; 10 }
Interviewer positioning
Open with how many environments and immutable artifact vocabulary in first two minutes.
Extended reference notes
- Reference sec-001-1: GCP Cloud Deploy targets map environments to GKE clusters with release approval hooks.
- Reference sec-001-2: Materialized views accelerate matrix queries for 180 services times four environments.
- Reference sec-001-3: Perf environment optional tier catches latency regressions before customer-facing staging soak.
- Reference sec-001-4: GitOps promotion updates env overlay revision; imperative Spinnaker fires pipeline parameters.
- Reference sec-001-5: Policy engine evaluates DAG edges dev-to-staging-to-prod with fail-closed semantics.
- Reference sec-001-6: Database migration service coordinates expand phase before new app version takes traffic.
- Reference sec-001-7: Blue-green at executor layer still uses same digest; only traffic switch changes.
- Reference sec-001-8: Mobile clients may lag server promotion; API backward compatibility gates matter.
- Reference sec-001-9: Container image promotion without digest pin is the top interview anti-pattern to call out.
- Reference sec-001-10: Error budget policy can freeze all prod promotions when burn rate exceeds threshold.
- Reference sec-001-11: Fourteen minute median rollback MTTR assumes previous digest still in registry retention.
- Reference sec-001-12: Fifteen requests per second burst during release train is napkin math interviewers accept.
- Reference sec-001-13: Correlation ids stitch CI build, promotion id, and executor deployment uid in logs.
- Reference sec-001-14: Cross-account ECR pulls require promotion service to assume role into prod account.
- Reference sec-001-15: Helm release history max limits matter when frequent promotions create revision spam.
- Reference sec-001-16: Jenkins input step pauses promotion until release manager clicks proceed.
- Reference sec-001-17: Internal developer portal shows promotion timeline per service for self-service visibility.
- Reference sec-001-18: Chaos experiments in staging validate blast radius before prod hop approval.
- Reference sec-001-19: Rate limit promotion API per team to prevent thundering herd on shared Spinnaker.
- Reference sec-001-20: Hedged requests are inappropriate for promotion writes; use idempotent retries instead.
- Reference sec-001-21: Outbox pattern publishes promotion-events after DB commit for reliable downstream audit.
- Reference sec-001-22: Redis cache warms matrix view with thirty second TTL for dashboard reads.
- Reference sec-001-23: Webhook HMAC verifies CI origin before accepting artifact registration payload.
- Reference sec-001-24: Maintenance freeze integrates with change advisory board ticket system.
- Reference sec-001-25: Hipaa environments require BAA approved approver groups for prod hops.
- Reference sec-001-26: Hotfix branch builds still produce new digest; never cherry-pick binaries manually.
- Reference sec-001-27: Latest tag in prod overlay is forbidden; interviewers reward explicit digest sha256.
- Reference sec-001-28: Skipping staging entirely requires stronger canary and automated rollback in prod.
- Reference sec-001-29: Manual kubectl set image bypasses audit; platform teams block via admission webhook.
- Reference sec-001-30: Sentinel policies in Terraform Cloud mirror same rules for infra promotions.
- Reference sec-001-31: Delegation of approval expires after eight hours to prevent stale authorizations.
- Reference sec-001-32: Shared library version bumps promote through same digest model as services.
- Reference sec-001-33: Batch jobs promote CronJob image digests independently from HTTP services.
- Reference sec-001-34: Init container digest changes promote with parent pod template revision.
- Reference sec-001-35: Secret rotation triggers new deploy revision without application digest change.
- Reference sec-001-36: Memory leak soak in staging uses longer window than functional test gate.
- Reference sec-001-37: Manifest list promotion pins all architectures atomically to avoid skew.
- Reference sec-001-38: EKS admission integrates OPA gatekeeper with promotion catalog lookup.
- Reference sec-001-39: Platform SRE owns promotion control plane; product teams own service gates.
- Reference sec-001-40: Cost guardrails block prod promotion when projected spend exceeds budget cap.
- Reference sec-001-41: Slack interactive message approves prod hop with signed callback to API.
- Reference sec-001-42: API keys for automation use scoped tokens unable to approve prod alone.
- Reference sec-001-43: Break glass role audited weekly for membership drift.
- Reference sec-001-44: Vulnerability SLA gates compare scan age against seven day threshold.
- Reference sec-001-45: Supply chain levels interview talking point maps to signed attestations.
- Reference sec-001-46: Promotion metrics exported to Prometheus with labels service env digest.
- Reference sec-001-47: Alert when prod digest diverges from staging for same service over threshold.
- Reference sec-001-48: Circular dependency teams coordinate shared promotion train window.
- Reference sec-001-49: Postmortem template links promotion id to incident timeline automatically.
- Reference sec-001-50: Interview time check at ten minutes: finish HLD and pick one deep dive.
- Reference sec-001-51: Spinnaker pipelines express promotion as stages with manual judgments between automated bake and deploy.
- Reference sec-001-52: OCI image digests survive tag reuse; promotion catalogs must store sha256, not floating semver tags.
- Reference sec-001-53: OPA policies can deny prod sync when staging soak timer has not elapsed for that digest.
- Reference sec-001-54: Break-glass promotion bypasses soak but requires ticket id and post-incident review within 24 hours.
- Reference sec-001-55: Change windows block prod hops on weekends unless incident severity overrides the calendar.
- Reference sec-001-56: Feature flags decouple runtime toggles from binary promotion when product needs gradual exposure.
- Reference sec-001-57: Vault namespaces isolate prod credentials from dev; promotion never copies secret material across tiers.
- Reference sec-001-58: Azure DevOps environments enforce checks before deployment jobs touch production subscriptions.
- Reference sec-001-59: Executor rate limits from Spinnaker APIs require worker pools with exponential backoff.
- Reference sec-001-60: Multi-region prod promotes same digest to each region with region-scoped config overlays.
- Reference sec-001-61: DORA lead time for changes measures commit to prod digest deploy timestamp.
- Reference sec-001-62: Human approval service integrates PagerDuty on-call roster for prod hop authorizers.
- Reference sec-001-63: Network policies per environment prevent staging pods from reaching prod data planes.
- Reference sec-001-64: Immutable infrastructure means AMIs or VM images also carry version ids in the catalog.
- Reference sec-001-65: Monorepo promotions can scope to changed service graph from build impact analysis.
- Reference sec-001-66: Staging data anonymization pipelines are out of band but block realistic integration tests.
- Reference sec-001-67: Audit log append-only store uses hash chaining for tamper-evident compliance exports.
- Reference sec-001-68: Twelve gigabytes compressed audit over seven years assumes JSON lines with retention policy.
- Reference sec-001-69: Fourteen hundred forty artifact registrations per day comes from one hundred eighty services times eight builds.
- Reference sec-001-70: Sealed secrets or external secrets operators inject per-env keys at deploy time.
- Reference sec-001-71: GCR artifact registry replication pre-stages digests near prod GKE for faster pulls.
- Reference sec-001-72: Argo CD sync waves order CRDs before deployments during promoted manifest apply.
- Reference sec-001-73: Terraform Cloud run tasks can call promotion API before apply reaches prod workspace.
- Reference sec-001-74: Scorecards rate services on promotion hygiene: digest pin, soak compliance, rollback drills.
- Reference sec-001-75: License compliance scan on container layers blocks promotion when GPL violations found.
- Reference sec-001-76: Dead letter queue holds promotion jobs when executor returns 503 during maintenance.
- Reference sec-001-77: Optimistic locking on promotion row prevents lost updates from concurrent approvers.
- Reference sec-001-78: Read replicas serve matrix API; writes go to primary promotion metadata store.
- Reference sec-001-79: GraphQL matrix query supports filtering by team and environment for portals.
- Reference sec-001-80: Clock skew tolerant soak timers use UTC instants stored in database not pod local time.
- Reference sec-001-81: SOC2 auditors sample promotion records proving who deployed what digest when.
- Reference sec-001-82: FedRAMP high environments may mandate air-gapped artifact promotion paths.
- Reference sec-001-83: Cherry-pick git without new CI build breaks immutable promotion story.
- Reference sec-001-84: Floating helm chart version without lock file breaks reproducible promotion.
- Reference sec-001-85: Team-owned Jenkins only works at small scale; central catalog appears around fifty services.
- Reference sec-001-86: Admission controller validates image digest exists in catalog before pod create.
- Reference sec-001-87: Service catalog registers owner team for each promotable component.
- Reference sec-001-88: Promotion denial reason codes feed developer feedback in portal UI.
- Reference sec-001-89: Library artifacts stored as Maven coordinates hash or npm package integrity hash.
- Reference sec-001-90: StatefulSet promotions may require ordered rollout gates beyond Deployment default.
- Reference sec-001-91: Sidecar envoy image bumps ride along parent service promotion record.
- Reference sec-001-92: Traffic shadowing in staging mirrors prod load profile for soak confidence.
- Reference sec-001-93: GPU workload promotions verify driver compatibility matrix per environment.
- Reference sec-001-94: Air gapped registry mirror sync delay extends soak timer for isolated prod.
- Reference sec-001-95: AKS Azure Policy addon enforces allowed registries from promotion approved list.
- Reference sec-001-96: Tier one services require CAB ticket linkage on prod promotion record.
- Reference sec-001-97: Carbon aware scheduling might defer prod promotion to greener grid windows optional.
- Reference sec-001-98: Email approval links expire in fifteen minutes to reduce stray click risk.
- Reference sec-001-99: Machine CI can promote dev to staging; prod requires human principal type.
- Reference sec-001-100: Quarterly access review exports promotion approver roster.
- Reference sec-001-101: License allow list on base images enforced at registration not at deploy.
- Reference sec-001-102: Reproducible builds tie digest back to git commit via build metadata API.
- Reference sec-001-103: Grafana dashboard shows in-flight promotions and queue depth.
- Reference sec-001-104: Version skew game identifies services on different digest generations.
- Reference sec-001-105: Freeze all promotions during black friday unless pre-approved digest list.
- Reference sec-001-106: Blameless culture still records technical root cause in promotion audit.
- Reference sec-001-107: Interview pitfall: conflating environment promotion with blue-green traffic only.
- Reference sec-001-108: Argo CD ApplicationSets generate one Application per cluster while sharing the same container digest pin.
- Reference sec-001-109: Kustomize overlays patch replicas and env vars while leaving the image reference immutable across tiers.
- Reference sec-001-110: SLSA attestations attach build provenance to artifacts before registration in the promotion catalog.
- Reference sec-001-111: Deployment matrix APIs answer which digest is live in prod versus staging for each microservice.
- Reference sec-001-112: Dual-control approval means two distinct SSO principals must approve the same promotion id.
- Reference sec-001-113: Config drift detectors compare live cluster manifests against git desired state per environment.
- Reference sec-001-114: AWS CodePipeline actions can invoke a central promotion API instead of rebuilding in prod stage.
- Reference sec-001-115: Kafka promotion-events topic feeds audit SIEM and deployment notification Slack channels.
- Reference sec-001-116: Canary analysis in staging can gate prod eligibility using error budget burn thresholds.
- Reference sec-001-117: Emergency lane compresses soak to two hours with VP approval and stronger synthetic monitors.
- Reference sec-001-118: Artifact registration webhook returns 202 and enqueues gate evaluation asynchronously.
- Reference sec-001-119: Schema registry compatibility checks block promotion when consumer contracts break.
- Reference sec-001-120: Service mesh mTLS identities differ per cluster so promoted workloads get correct certs.
- Reference sec-001-121: Serverless promotions pin Lambda image digests or layer hashes in the same catalog model.
- Reference sec-001-122: Bazel remote cache keys tie artifact lineage to git tree hash for reproducibility.
- Reference sec-001-123: Synthetic checks post-deploy validate critical user journeys per environment tier.
- Reference sec-001-124: Promotion SLA p95 under twelve minutes to staging keeps release trains predictable.
- Reference sec-001-125: Ninety-six percent automated gate pass rate is realistic with tuned flaky test quarantine.
- Reference sec-001-126: Forty prod promotions per day implies selective manual approval not every CI build.
- Reference sec-001-127: Workload identity federation avoids long-lived cloud keys in Jenkins agents.
- Reference sec-001-128: ACR geo-replication mirrors images before AKS promotion in another region.
- Reference sec-001-129: Spinnaker red/black strategy pairs with promotion gate on baseline metrics.
- Reference sec-001-130: Pulumi deployments stack updates can be gated by same central policy service.
- Reference sec-001-131: Game days rehearse failed promotion rollback without touching customer traffic.
- Reference sec-001-132: PII static analysis on configs prevents accidental prod env pointing to dev databases.
- Reference sec-001-133: Circuit breaker on executor adapter stops hammering unhealthy Argo CD API server.
- Reference sec-001-134: Saga compensation redeploys previous digest if post-deploy smoke fails in prod.
- Reference sec-001-135: CockroachDB or Postgres with serializable isolation suits promotion state transitions.
- Reference sec-001-136: REST pagination on artifact list uses cursor on registered_at for large catalogs.
- Reference sec-001-137: Daylight saving change windows stored in timezone aware calendar service.
- Reference sec-001-138: PCI scope separation keeps cardholder data environments on stricter promotion DAG.
- Reference sec-001-139: Edge cases include promoting config-only change without new digest when using flags.
- Reference sec-001-140: Rebuild for prod branch duplicates test surface and invalidates staging evidence.
- Reference sec-001-141: Promotion of database schema without app version alignment causes runtime crashes.
- Reference sec-001-142: GitOps reconcile drift should not auto-heal prod to wrong digest without promotion record.
- Reference sec-001-143: Policy as code in Conftest tests rendered manifests per environment overlay.
- Reference sec-001-144: On-call rotation tied to approval means only current primary can approve prod.
- Reference sec-001-145: Partial promotion of service mesh config without app is valid for platform teams.
- Reference sec-001-146: Windows container promotions on AKS follow identical catalog and gate model.
- Reference sec-001-147: DaemonSet node agent promotions coordinate with kernel compatibility matrix.
- Reference sec-001-148: ConfigMap-only promotion without image change uses manifest revision id in catalog.
- Reference sec-001-149: Load test gate compares p99 latency delta under five percent versus baseline digest.
- Reference sec-001-150: ARM64 digest separate from AMD64 requires multi-arch manifest list in catalog.
- Reference sec-001-151: Binary authorization in GKE checks attestations before deployed digest starts.
- Reference sec-001-152: Crossplane composite resource promotion ties cloud infra to app digest events.
- Reference sec-001-153: Tier three internal tools auto-promote dev to staging without human touch.
- Reference sec-001-154: Documentation generation attaches change log snippet from git commits to promotion.
- Reference sec-001-155: Mobile push approval for executives is rare but supported via SSO app.
- Reference sec-001-156: Service account promotion bots forbidden from prod approve role binding.
- Reference sec-001-157: Pen test findings block promotion until severity critical items closed.
- Reference sec-001-158: SBOM diff highlights new dependencies introduced since last prod digest.
- Reference sec-001-159: Build cache poisoning mitigated by hermetic CI runners per build.
- Reference sec-001-160: Alert when staging digest older than seven days blocks silent staleness.
- Reference sec-001-161: Dependency graph promotion orders services topologically when contracts require.
- Reference sec-001-162: Unfreeze requires executive communication template in runbook.
- Reference sec-001-163: Interview close: draw three lanes register promote execute on whiteboard.
- Reference sec-001-164: Interview strength: stating fail-closed policy engine before naming tools.
- Reference sec-001-165: Jenkins promotion jobs copy build metadata forward without re-running Maven or npm compile on prod branches.
- Reference sec-001-166: Helm values files per environment let you promote chart version plus digest without rebuilding charts.
- Reference sec-001-167: Cosign signatures on images become a gate input alongside unit test and SAST scan results.
- Reference sec-001-168: Idempotency-Key headers prevent duplicate prod deploys when CI webhooks retry on timeout.
- Reference sec-001-169: Expand-contract schema migrations run as separate gates before app digest reaches prod.
- Reference sec-001-170: Rollback is redeploy of last cataloged good digest, not git revert of application source alone.
- Reference sec-001-171: GCP Cloud Deploy targets map environments to GKE clusters with release approval hooks.
- Reference sec-001-172: Materialized views accelerate matrix queries for 180 services times four environments.
- Reference sec-001-173: Perf environment optional tier catches latency regressions before customer-facing staging soak.
- Reference sec-001-174: GitOps promotion updates env overlay revision; imperative Spinnaker fires pipeline parameters.
- Reference sec-001-175: Policy engine evaluates DAG edges dev-to-staging-to-prod with fail-closed semantics.
- Reference sec-001-176: Database migration service coordinates expand phase before new app version takes traffic.
- Reference sec-001-177: Blue-green at executor layer still uses same digest; only traffic switch changes.
- Reference sec-001-178: Mobile clients may lag server promotion; API backward compatibility gates matter.
- Reference sec-001-179: Container image promotion without digest pin is the top interview anti-pattern to call out.
- Reference sec-001-180: Error budget policy can freeze all prod promotions when burn rate exceeds threshold.
- Reference sec-001-181: Fourteen minute median rollback MTTR assumes previous digest still in registry retention.
- Reference sec-001-182: Fifteen requests per second burst during release train is napkin math interviewers accept.
- Reference sec-001-183: Correlation ids stitch CI build, promotion id, and executor deployment uid in logs.
- Reference sec-001-184: Cross-account ECR pulls require promotion service to assume role into prod account.
- Reference sec-001-185: Helm release history max limits matter when frequent promotions create revision spam.
- Reference sec-001-186: Jenkins input step pauses promotion until release manager clicks proceed.
- Reference sec-001-187: Internal developer portal shows promotion timeline per service for self-service visibility.
- Reference sec-001-188: Chaos experiments in staging validate blast radius before prod hop approval.
- Reference sec-001-189: Rate limit promotion API per team to prevent thundering herd on shared Spinnaker.
- Reference sec-001-190: Hedged requests are inappropriate for promotion writes; use idempotent retries instead.
- Reference sec-001-191: Outbox pattern publishes promotion-events after DB commit for reliable downstream audit.
- Reference sec-001-192: Redis cache warms matrix view with thirty second TTL for dashboard reads.
- Reference sec-001-193: Webhook HMAC verifies CI origin before accepting artifact registration payload.
- Reference sec-001-194: Maintenance freeze integrates with change advisory board ticket system.
- Reference sec-001-195: Hipaa environments require BAA approved approver groups for prod hops.
- Reference sec-001-196: Hotfix branch builds still produce new digest; never cherry-pick binaries manually.
- Reference sec-001-197: Latest tag in prod overlay is forbidden; interviewers reward explicit digest sha256.
- Reference sec-001-198: Skipping staging entirely requires stronger canary and automated rollback in prod.
- Reference sec-001-199: Manual kubectl set image bypasses audit; platform teams block via admission webhook.
- Reference sec-001-200: Sentinel policies in Terraform Cloud mirror same rules for infra promotions.
How to open this one
The framing that signals depth on environment promotion is the same-artifact ladder: the identical, immutable build flows dev to staging to prod, gated at each step, with only configuration changing between environments. Lead with why you promote a digest rather than rebuild per environment — a rebuild can diverge — and the failure story that proves it: config drift between staging and prod causes a deploy that passed staging to fail in prod. That shows you understand promotion is about proving the exact bytes are safe, then changing nothing but config.
Key Highlights
- •Artifact catalog binds digest to CI attestations
- •Promotion policy DAG with soak timers and approvals
- •Executor adapters for Argo CD, Spinnaker, Jenkins
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "I would start from artifact registration → gated promotion graph → executor sync with env overlays."
- "Happy to deep dive Spinnaker vs Argo promotion or schema coupling—your choice."