From: Thanh Ha Date: Wed, 6 Jul 2016 00:27:10 +0000 (-0400) Subject: Fix archiving script to trim the end of the log file X-Git-Tag: v0.0.6~22 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=7b70cf596544b9c649ea1bd1dd97027d18c89931;p=releng%2Flftools.git 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 --- 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" \