Grab the html version of console log

Currently we are only grabbing the text output from Jenkins. However,
this doesn't have timestamps which isn't ideal. We can use the
internal url that is used by Jenkins to generate its web page to
fetch the console logs with timestamps and formatting.

We need to surround the output in pre tags since os-loganlayze uses
that to determine whether to escape the html or not.

Change-Id: I7584ea37f84521d65f327f327ff5e47b096fa230
This commit is contained in:
Joshua Hesketh 2014-10-07 16:58:57 +11:00 committed by Andreas Jaeger
parent 16bb6b3f44
commit ca9b73efba

@ -2,5 +2,17 @@
echo "Grabbing consoleLog"
console_log_path='consoleText'
wget -O /tmp/console.txt --no-check-certificate $BUILD_URL$console_log_path
# Get the plain text version (does not contain links or timestamps)
# (Disabled for now)
#console_log_path='consoleText'
#wget -O /tmp/console.txt --no-check-certificate $BUILD_URL$console_log_path
# Grab the HTML version of the log (includes timestamps)
console_log_path='logText/progressiveHtml'
wget -O /tmp/console.html --no-check-certificate $BUILD_URL$console_log_path
# We need to add <pre> tags around the output for log-osanalyze to not escape
# the content
sed -i '1s/^/<pre>\n/' /tmp/console.html
echo "</pre>" >> /tmp/console.html