print e2e logs (#365)

* keep origin pre and post logs

* print origin pre and post logs
This commit is contained in:
Marc Brugger 2024-07-08 21:23:08 +02:00 committed by GitHub
parent c32ed90a2e
commit 3625395d32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 5 deletions

View file

@ -33,10 +33,14 @@ jobs:
- name: Install Helm Chart - name: Install Helm Chart
run: ./testdata/e2e/bin/install-chart.sh ${{ matrix.build.mode }} run: ./testdata/e2e/bin/install-chart.sh ${{ matrix.build.mode }}
- name: Wait for pod to start
run: ./testdata/e2e/bin/wait-for-start.sh ${{ matrix.build.protocol }}
- name: Show origin pre Logs
run: ./testdata/e2e/bin/show-origin-logs.sh pre
- name: Wait for sync to finish - name: Wait for sync to finish
run: ./testdata/e2e/bin/wait-for-sync.sh ${{ matrix.build.protocol }} run: ./testdata/e2e/bin/wait-for-sync.sh ${{ matrix.build.protocol }}
- name: Show origin Logs - name: Show origin post Logs
run: ./testdata/e2e/bin/show-origin-logs.sh run: ./testdata/e2e/bin/show-origin-logs.sh post
- name: Show Replica Logs - name: Show Replica Logs
run: ./testdata/e2e/bin/show-replica-logs.sh run: ./testdata/e2e/bin/show-replica-logs.sh
- name: Show Sync Logs - name: Show Sync Logs

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
echo "## Pod adguardhome-origin logs" >> $GITHUB_STEP_SUMMARY echo "## Pod adguardhome-origin ${1} logs" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY
kubectl logs adguardhome-origin >> $GITHUB_STEP_SUMMARY kubectl logs adguardhome-origin >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY

3
testdata/e2e/bin/wait-for-start.sh vendored Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/adguardhome-sync --timeout=1m

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/adguardhome-sync --timeout=1m
kubectl port-forward pod/adguardhome-sync 9090:9090 & kubectl port-forward pod/adguardhome-sync 9090:9090 &
for i in {1..6}; do for i in {1..6}; do