From 466b1c6b0c7553136a76ccc9a68418465984a83f Mon Sep 17 00:00:00 2001 From: Barry Walker Date: Sat, 24 Jan 2026 17:04:56 -0500 Subject: [PATCH] fix(ci): add diagnostic output on deployment failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show pod status, events, describe, and logs when k8s rollout fails instead of just timing out with no context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .woodpecker/release.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index ef3f527..eaa828d 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -268,7 +268,29 @@ steps: -n default # Wait for rollout to complete - kubectl rollout status deployment/paperless-mcp -n default --timeout=120s + if ! kubectl rollout status deployment/paperless-mcp -n default --timeout=120s; then + echo "" + echo "========== DEPLOYMENT FAILED ==========" + echo "" + echo "=== Pod Status ===" + kubectl get pods -n default -l app=paperless-mcp + echo "" + echo "=== Recent Events ===" + kubectl get events -n default --sort-by='.lastTimestamp' \ + --field-selector involvedObject.kind=Pod 2>/dev/null | grep paperless-mcp | tail -10 + echo "" + echo "=== Pod Describe (problematic pods) ===" + for pod in $(kubectl get pods -n default -l app=paperless-mcp -o jsonpath='{.items[?(@.status.phase!="Running")].metadata.name}'); do + echo "--- $pod ---" + kubectl describe pod "$pod" -n default | tail -20 + done + echo "" + echo "=== Container Logs ===" + kubectl logs -n default -l app=paperless-mcp --tail=30 --all-containers 2>/dev/null || echo "No logs available" + echo "" + echo "========================================" + exit 1 + fi echo "Deployment complete!" depends_on: [docker, release]