Skip to content

Commit 05df452

Browse files
committed
update gh-action to get logs
1 parent 7f02e70 commit 05df452

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/pr-tests.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,22 @@ jobs:
101101
TEST_CONFIG_FILE: ${{ env.CONFIG_FILE }}
102102
working-directory: starship
103103

104+
- name: Log pods
105+
if: failure()
106+
run: |
107+
kubectl get pods -n $NAMESPACE
108+
for i in `kubectl get po -n $NAMESPACE -o json | jq -r '.items[].metadata.name'`; do
109+
echo "==================================================="
110+
echo "Logs for $i"
111+
kubectl describe pods $i -n $NAMESPACE
112+
kubectl logs $i -n $NAMESPACE -c faucet --tail=10000
113+
echo "=====================Previous======================"
114+
kubectl logs $i -n $NAMESPACE -c faucet --previous --tail=10000
115+
echo "==================================================="
116+
done
117+
env:
118+
NAMESPACE: ${{ steps.starship-action.outputs.namespace }}
119+
104120
# todo: change this to be post step of the action
105121
- name: Cleanup cluster
106122
if: always()

0 commit comments

Comments
 (0)