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 authored and openshift-merge-bot[bot] committed Nov 14, 2024
1 parent bacb3e3 commit 166893d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/kind-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,47 @@ 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: |
kubectl -n test-dspa get pods
kubectl -n opendatahub get pods
POD_NAMES=$(kubectl -n test-dspa get pods -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 -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 166893d

Please sign in to comment.