2e51d359c85b3d1aa4ff934606793261fa0f2869
[ci-management.git] / jjb / lab / include-raw-lab-retrieve-logs.sh
1 #!/bin/bash
2 set -xe -o pipefail
3
4 echo Job triggered by $SRC_BUILD_URL
5 echo Retriving logs from $LOG_DIR_URL
6
7 rm -rf archives
8 wget -r -nv -nd --no-parent -l 1 --reject="index.html*" -P archives "$LOG_DIR_URL"
9 curl -f "$SRC_BUILD_URL/timestamps?time=HH:mm:ssZ&appendLog" > archives/console-timestamp.log
10 if [ -s archives/console-timestamp.log ]; then
11     cat archives/console-timestamp.log
12 else
13     cat archives/console.log
14 fi