jjb/common: if any, display lava error msg in jenkins log 81/12581/5
authorLoys Ollivier <lollivier@baylibre.com>
Thu, 14 Dec 2017 10:27:41 +0000 (11:27 +0100)
committerLoys Ollivier <lollivier@baylibre.com>
Fri, 15 Dec 2017 15:44:18 +0000 (16:44 +0100)
Do a second grep on the lava log to include lava error message if there
was any. This is usefull in case a job fails. The error can be read
directly out of the jenkins log.

JIRA: SPEC-1178

Change-Id: Id3333df9c56dd67f5d664ae0d234e33e3300c366
Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
jjb/common/include-agl-lava-jobs-submit.sh

index 217e8da..7794d7f 100644 (file)
@@ -46,6 +46,7 @@ JOB_OUTPUT="${JOB_BASE}_output.yaml"
 JOB_LOG="${JOB_BASE}_output.log"
 curl -s -o $JOB_OUTPUT $lava_url/scheduler/job/$job_id/log_file/plain
 cat $JOB_OUTPUT | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' | tee $JOB_LOG
+cat $JOB_OUTPUT | grep '"error_msg":' | sed -e 's#.*"error_msg": "##g' -e 's#", ".*##g' | tee -a $JOB_LOG
 
 echo "####"
 echo "#### End: Output from LAVA job $job_id ####"