From 7b70cf596544b9c649ea1bd1dd97027d18c89931 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 5 Jul 2016 20:27:10 -0400 Subject: [PATCH] Fix archiving script to trim the end of the log file Because the console log is still running while we are downloading it to archive to logs.opendaylight.org it ends abruptly and causes confusion. This patch trims the log so it will have a natural end to it's log. Change-Id: Ic68828d2209a1c95e3c8282a82bc12f3138105a6 Signed-off-by: Thanh Ha --- include-raw-deploy-archives.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include-raw-deploy-archives.sh b/include-raw-deploy-archives.sh index 1ecfc069..572e2cb0 100644 --- a/include-raw-deploy-archives.sh +++ b/include-raw-deploy-archives.sh @@ -50,10 +50,16 @@ cat > deploy-archives.xml < /dev/null 2>&1 touch $ARCHIVES_DIR/_build-details.txt echo "build-url: ${{BUILD_URL}}" >> $ARCHIVES_DIR/_build-details.txt + +# Magic string used to trim console logs at the appropriate level during wget +echo "-----END_OF_BUILD-----" wget -O $ARCHIVES_DIR/_console-output.log ${{BUILD_URL}}consoleText +sed -i '/^-----END_OF_BUILD-----$/,$d' $ARCHIVES_DIR/_console-output.log + gzip $ARCHIVES_DIR/*.txt $ARCHIVES_DIR/*.log # find and gzip all text files find $ARCHIVES_DIR -name "*.txt" \ -- 2.16.6