Skip to content

Commit

Permalink
Collect events and logs
Browse files Browse the repository at this point in the history
Signed-off-by: Helber Belmiro <[email protected]>
  • Loading branch information
hbelmiro committed Nov 13, 2024
1 parent c51b498 commit 4dade96
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/kind-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,44 @@ jobs:
uses: ./.github/actions/kind

- name: Run test
id: test
working-directory: ${{ github.workspace }}/.github/scripts/tests
run: |
sh tests.sh --kind
continue-on-error: true

- name: Collect events and logs
if: steps.test.outcome != 'success'
run: |
POD_NAMES=$(kubectl -n test-dspa get pods --field-selector=status.phase=Running -o custom-columns=":metadata.name")
for POD_NAME in ${POD_NAMES}; do
echo "===== Pod: ${POD_NAME} ====="
echo "----- EVENTS -----"
kubectl describe pod ${POD_NAME} -n test-dspa | grep -A 100 Events
echo "----- LOGS -----"
kubectl logs ${POD_NAME} -n test-dspa
echo "==========================="
echo ""
done
POD_NAMES=$(kubectl -n opendatahub get pods --field-selector=status.phase=Running -o custom-columns=":metadata.name")
for POD_NAME in ${POD_NAMES}; do
echo "===== Pod: ${POD_NAME} ====="
echo "----- EVENTS -----"
kubectl describe pod ${POD_NAME} -n opendatahub | grep -A 100 Events
echo "----- LOGS -----"
kubectl logs ${POD_NAME} -n opendatahub
echo "==========================="
echo ""
done
exit 1

0 comments on commit 4dade96

Please sign in to comment.