-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub actions - began to capture logs and pod descriptions when fail…
…ures occurs in the actions
- Loading branch information
1 parent
9ce4381
commit 015412b
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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 }} |