Prefix timestamps on archived console logs 75/4075/1
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 6 Dec 2016 08:54:02 +0000 (18:54 +1000)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 4 Mar 2017 19:24:28 +0000 (14:24 -0500)
Time stamper plugin adds time stamps only to the jobs console logs,
which is unavailble on the archived console logs. This change fixes
the issue using the paste command.

Change-Id: Idc08840622a62dc679b0030554cfb4377472d726
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
include-raw-deploy-archives.sh

index 3873406..991b2df 100644 (file)
@@ -90,7 +90,9 @@ touch $ARCHIVES_DIR/_sys-info.txt
 # Magic string used to trim console logs at the appropriate level during wget
 echo "-----END_OF_BUILD-----"
 wget -O $ARCHIVES_DIR/console.log ${{BUILD_URL}}consoleText
+wget -O $ARCHIVES_DIR/console-timestamp.log "${{BUILD_URL}}/timestamps?time=HH:mm:ss&appendLog"
 sed -i '/^-----END_OF_BUILD-----$/,$d' $ARCHIVES_DIR/console.log
+sed -i '/^.*-----END_OF_BUILD-----$/,$d' $ARCHIVES_DIR/console-timestamp.log
 
 gzip $ARCHIVES_DIR/*.txt $ARCHIVES_DIR/*.log
 # find and gzip any 'text' files