Skip to content

Commit 2177fce

Browse files
GitHub actions - began to capture logs and pod descriptions when fail…
1 parent c1459b6 commit 2177fce

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/e2e.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ jobs:
2121
- name: Run the extension developer e2e test
2222
run: make extension-developer-e2e
2323

24+
- name: Collect pod logs and descriptions on failure
25+
if: failure()
26+
run: |
27+
echo "Fetching pod logs and descriptions..."
28+
kubectl get pods -n olmv1-system -o wide || true
29+
for pod in $(kubectl get pods -n olmv1-system -o name); do
30+
echo "Collecting logs for $pod..."
31+
kubectl logs $pod -n olmv1-system || true
32+
echo "Describing $pod..."
33+
kubectl describe $pod -n olmv1-system || true
34+
done
35+
env:
36+
KUBECONFIG: ${{ secrets.KUBECONFIG }}
37+
2438
e2e-kind:
2539
runs-on: ubuntu-latest
2640
steps:
@@ -35,6 +49,20 @@ jobs:
3549
- name: Run e2e tests
3650
run: ARTIFACT_PATH=/tmp/artifacts make test-e2e
3751

52+
- name: Collect pod logs and descriptions on failure
53+
if: failure()
54+
run: |
55+
echo "Fetching pod logs and descriptions..."
56+
kubectl get pods -n olmv1-system -o wide || true
57+
for pod in $(kubectl get pods -n olmv1-system -o name); do
58+
echo "Collecting logs for $pod..."
59+
kubectl logs $pod -n olmv1-system || true
60+
echo "Describing $pod..."
61+
kubectl describe $pod -n olmv1-system || true
62+
done
63+
env:
64+
KUBECONFIG: ${{ secrets.KUBECONFIG }}
65+
3866
- uses: cytopia/[email protected]
3967
if: failure()
4068
with:
@@ -59,3 +87,17 @@ jobs:
5987

6088
- name: Run the upgrade e2e test
6189
run: make test-upgrade-e2e
90+
91+
- name: Collect pod logs and descriptions on failure
92+
if: failure()
93+
run: |
94+
echo "Fetching pod logs and descriptions..."
95+
kubectl get pods -n olmv1-system -o wide || true
96+
for pod in $(kubectl get pods -n olmv1-system -o name); do
97+
echo "Collecting logs for $pod..."
98+
kubectl logs $pod -n olmv1-system || true
99+
echo "Describing $pod..."
100+
kubectl describe $pod -n olmv1-system || true
101+
done
102+
env:
103+
KUBECONFIG: ${{ secrets.KUBECONFIG }}

0 commit comments

Comments
 (0)