docker-services/.ci/gen_output.sh
2025-01-06 22:35:18 +01:00

28 lines
727 B
Bash
Executable file

set -x -e
echo "" > output.txt
process_output() {
if [ $? -eq 0 ]; then
head -n 5 output_tmp.txt >> output.txt
echo "... [See pipeline output for full details]" >> output.txt
tail -n 5 output_tmp.txt >> output.txt
else
cat output_tmp.txt >> output.txt
fi
}
echo "-- START Port attribution watcher --" | tee -a output.txt
python3 .ci/port_attribution_watcher.py | tee output_tmp.txt
process_output
echo "-- END Port attribution watcher --" | tee -a output.txt
echo "" >> output.txt
echo "-- START Traefik label watcher --" | tee -a output.txt
python3 .ci/traefik_label_watcher.py | tee output_tmp.txt
process_output
echo "-- END Traefik label watcher --" | tee -a output.txt