Skip to content

Commit 8531409

Browse files
committed
Better logging on webstandard job errors on CI.
Also tolerate errors when archiving the site.
1 parent 0f0f46a commit 8531409

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/jobs/webstandard.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,20 @@ RET=$?
6767
section_end
6868

6969
section_start "Archive downloaded site"
70+
set +e
7071
cp -r localhost $ARTIFACTS/
72+
set -e
7173
section_end
7274

7375
section_start "Analyse failures"
74-
#https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html
76+
# https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html
7577
# Exit code 4 is network error which we can ignore
76-
# Exit code 8 can also be because of HTTP404 or 400
77-
if [ $RET -ne 4 ] && [ $RET -ne 0 ] && [ $RET -ne 8 ]; then
78+
# Exit code 8 can also be because of HTTP 400 or 404
79+
if [ $RET -ne 0 ] && [ $RET -ne 4 ] && [ $RET -ne 8 ]; then
80+
echo "Server log"
81+
tail -n1000 /opt/domjude/domserver/webapp/var/log/prod.log
82+
section_end
83+
7884
exit $RET
7985
fi
8086

0 commit comments

Comments
 (0)