fix(actions): add debug step on failure
Some checks failed
/ validate (pull_request) Failing after 7m11s
Some checks failed
/ validate (pull_request) Failing after 7m11s
This commit is contained in:
parent
d024585711
commit
25f0f9c064
1 changed files with 17 additions and 1 deletions
|
|
@ -52,13 +52,29 @@ jobs:
|
|||
|
||||
- name: Wait for ArgoCD sync
|
||||
run: |
|
||||
sleep 10
|
||||
kubectl wait applications \
|
||||
--all \
|
||||
--namespace argocd \
|
||||
--for=jsonpath='{.status.health.status}'=Healthy \
|
||||
--timeout=300s
|
||||
|
||||
- name: Debug on failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "=== Applications ==="
|
||||
kubectl get applications -n argocd
|
||||
echo "=== Pods (all namespaces) ==="
|
||||
kubectl get pods --all-namespaces
|
||||
echo "=== Failed pods logs ==="
|
||||
kubectl get pods --all-namespaces --field-selector=status.phase!=Running,status.phase!=Succeeded \
|
||||
-o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{"\n"}{end}' | \
|
||||
while read ns pod; do
|
||||
echo "--- $ns/$pod ---"
|
||||
kubectl logs -n $ns $pod --all-containers --tail=50 2>/dev/null || true
|
||||
done
|
||||
echo "=== Events ==="
|
||||
kubectl get events --all-namespaces --sort-by='.lastTimestamp' | tail -50
|
||||
|
||||
- name: Wait for all deployments
|
||||
run: kubectl wait --for=condition=available --timeout=300s deployment --all --all-namespaces
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue