Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 add Github action to capture logs and pod descriptions when e2e fails #1510

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading