Interview Prep/Jenkins/Integrations & delivery

A Helm-based deploy stage occasionally fails with a stuck release and blocks all later deploys. Design the stage to be robust.

IntermediateScenarioIntegrations & delivery
Answer

Situation read → Helm leaves the release in pending-upgrade if interrupted.

What I'd do →

  1. Use helm upgrade --install --atomic --timeout 5m --wait so failed upgrades roll back automatically.
  2. Use lock(resource: "deploy-${ENV}") so two builds never upgrade the same release concurrently.
  3. Put a stage timeout slightly longer than Helm's timeout so Jenkins does not kill Helm mid-operation.
  4. Document recovery: helm history, helm rollback <release> <rev>.

Why → Atomic upgrades plus locks remove the two common causes of stuck releases.

Interview tip → Mention --atomic (renamed --rollback-on-failure in Helm 4) so you sound current.

All Jenkins questions Roadmap: Jenkins

More on Integrations & delivery