Skip to content

Commit b3ff79c

Browse files
committed
fix ci
1 parent bbfd6f2 commit b3ff79c

File tree

3 files changed

+303
-101
lines changed

3 files changed

+303
-101
lines changed

.github/workflows/test-e2e-lifecycle.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,50 @@ jobs:
116116
export KUBECONFIG=kconfig.yaml
117117
task thv-operator-e2e-test-run
118118
119+
- name: Capture pod logs before cleanup
120+
if: always()
121+
run: |
122+
export KUBECONFIG=kconfig.yaml
123+
echo "========================================="
124+
echo "Capturing logs from all pods in default namespace"
125+
echo "========================================="
126+
127+
# Get all pods in default namespace
128+
kubectl get pods -n default --kubeconfig kconfig.yaml -o wide || true
129+
130+
echo ""
131+
echo "========================================="
132+
echo "Pod logs:"
133+
echo "========================================="
134+
135+
# Get logs from all pods in default namespace
136+
for pod in $(kubectl get pods -n default --kubeconfig kconfig.yaml -o jsonpath='{.items[*].metadata.name}' 2>/dev/null || true); do
137+
echo ""
138+
echo "========== Pod: $pod =========="
139+
140+
# Get pod status
141+
kubectl get pod $pod -n default --kubeconfig kconfig.yaml -o yaml 2>/dev/null | grep -A 20 "^status:" || true
142+
143+
echo ""
144+
echo "--- Container logs for $pod ---"
145+
146+
# Get logs from all containers in the pod
147+
containers=$(kubectl get pod $pod -n default --kubeconfig kconfig.yaml -o jsonpath='{.spec.containers[*].name}' 2>/dev/null || true)
148+
for container in $containers; do
149+
echo ""
150+
echo "Container: $container"
151+
kubectl logs $pod -n default -c $container --tail=200 --kubeconfig kconfig.yaml 2>&1 || echo "Failed to get logs for $container"
152+
done
153+
154+
echo ""
155+
done
156+
157+
echo ""
158+
echo "========================================="
159+
echo "Pod events:"
160+
echo "========================================="
161+
kubectl get events -n default --kubeconfig kconfig.yaml --sort-by='.lastTimestamp' || true
162+
119163
- name: Cleanup cluster
120164
if: always()
121165
run: |

0 commit comments

Comments
 (0)