Skip to content

Commit 166893d

Browse files
hbelmiroopenshift-merge-bot[bot]
authored andcommitted
Collect events and logs
Signed-off-by: Helber Belmiro <[email protected]>
1 parent bacb3e3 commit 166893d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/kind-integration.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,47 @@ jobs:
4747
uses: ./.github/actions/kind
4848

4949
- name: Run test
50+
id: test
5051
working-directory: ${{ github.workspace }}/.github/scripts/tests
5152
run: |
5253
sh tests.sh --kind
54+
continue-on-error: true
55+
56+
- name: Collect events and logs
57+
if: steps.test.outcome != 'success'
58+
run: |
59+
kubectl -n test-dspa get pods
60+
kubectl -n opendatahub get pods
61+
62+
POD_NAMES=$(kubectl -n test-dspa get pods -o custom-columns=":metadata.name")
63+
64+
for POD_NAME in ${POD_NAMES}; do
65+
echo "===== Pod: ${POD_NAME} ====="
66+
67+
echo "----- EVENTS -----"
68+
kubectl describe pod ${POD_NAME} -n test-dspa | grep -A 100 Events
69+
70+
echo "----- LOGS -----"
71+
kubectl logs ${POD_NAME} -n test-dspa
72+
73+
echo "==========================="
74+
echo ""
75+
done
76+
77+
POD_NAMES=$(kubectl -n opendatahub get pods -o custom-columns=":metadata.name")
78+
79+
for POD_NAME in ${POD_NAMES}; do
80+
echo "===== Pod: ${POD_NAME} ====="
81+
82+
echo "----- EVENTS -----"
83+
kubectl describe pod ${POD_NAME} -n opendatahub | grep -A 100 Events
84+
85+
echo "----- LOGS -----"
86+
kubectl logs ${POD_NAME} -n opendatahub
87+
88+
echo "==========================="
89+
echo ""
90+
done
91+
92+
exit 1
93+

0 commit comments

Comments
 (0)