diff --git a/scripts/deploy-preview.py b/scripts/deploy-preview.py index d901d7f..508d393 100644 --- a/scripts/deploy-preview.py +++ b/scripts/deploy-preview.py @@ -198,9 +198,10 @@ def deploy(pr_id: str): kubectl("apply", "-f", str(p)) p.unlink() - # 5. Wait for rollout - print("[5/5] Waiting for rollout...") - kubectl("rollout", "status", f"deploy/oil-calculator", "-n", ns, "--timeout=120s") + # 5. Restart to pick up new image and wait + print("[5/5] Restarting deployment...") + kubectl("rollout", "restart", "deploy/oil-calculator", "-n", ns) + kubectl("rollout", "status", "deploy/oil-calculator", "-n", ns, "--timeout=120s") # Cleanup run("rm -rf data/oil_calculator.db", check=False)