adguardhome-sync/testdata/e2e/bin/show-replica-logs.sh
Marc Brugger 6b07040ad7
move e2e test in regular build (#136)
* move e2e test in regular build

* write to summary
2022-12-25 11:49:37 +01:00

18 lines
771 B
Bash
Executable file

#!/bin/bash
set -e
for pod in $(kubectl get pods -l bakito.net/adguardhome-sync=replica -o name); do
echo "## Pod ${pod} logs" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
LOGS=$(kubectl logs ${pod})
# ignore certain errors
LOGS=$(echo -e "${LOGS}" | grep -v -e "error.* deleting filter .* no such file or directory" )
# https://github.com/AdguardTeam/AdGuardHome/issues/4944
LOGS=$(echo -e "${LOGS}" | grep -v -e "error.* creating dhcpv4 srv")
echo -e "${LOGS}" >> $GITHUB_STEP_SUMMARY
ERRORS=$(echo -e "${LOGS}"} | grep '\[error\]' | wc -l)
echo '```' >> $GITHUB_STEP_SUMMARY
echo "Found ${ERRORS} error(s) in ${pod} log" >> $GITHUB_STEP_SUMMARY
echo "----------------------------------------------" >> $GITHUB_STEP_SUMMARY
done