Skip to content

Commit

Permalink
GitHub actions - began to capture logs and pod descriptions when fail…
Browse files Browse the repository at this point in the history
…ures occurs in the actions
  • Loading branch information
camilamacedo86 committed Nov 26, 2024
1 parent 9ce4381 commit 015412b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ jobs:
- name: Run the extension developer e2e test
run: make extension-developer-e2e

- name: Collect pod logs and descriptions on failure
if: failure()
run: |
echo "Fetching pod logs and descriptions..."
kubectl get pods -n olmv1-system -o wide || true
for pod in $(kubectl get pods -n olmv1-system -o name); do
echo "Collecting logs for $pod..."
kubectl logs $pod -n olmv1-system || true
echo "Describing $pod..."
kubectl describe $pod -n olmv1-system || true
done
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}

e2e-kind:
runs-on: ubuntu-latest
steps:
Expand All @@ -35,6 +49,20 @@ jobs:
- name: Run e2e tests
run: ARTIFACT_PATH=/tmp/artifacts make test-e2e

- name: Collect pod logs and descriptions on failure
if: failure()
run: |
echo "Fetching pod logs and descriptions..."
kubectl get pods -n olmv1-system -o wide || true
for pod in $(kubectl get pods -n olmv1-system -o name); do
echo "Collecting logs for $pod..."
kubectl logs $pod -n olmv1-system || true
echo "Describing $pod..."
kubectl describe $pod -n olmv1-system || true
done
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}

- uses: cytopia/[email protected]
if: failure()
with:
Expand All @@ -59,3 +87,17 @@ jobs:

- name: Run the upgrade e2e test
run: make test-upgrade-e2e

- name: Collect pod logs and descriptions on failure
if: failure()
run: |
echo "Fetching pod logs and descriptions..."
kubectl get pods -n olmv1-system -o wide || true
for pod in $(kubectl get pods -n olmv1-system -o name); do
echo "Collecting logs for $pod..."
kubectl logs $pod -n olmv1-system || true
echo "Describing $pod..."
kubectl describe $pod -n olmv1-system || true
done
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}

0 comments on commit 015412b

Please sign in to comment.