diff options
author | mbeierl <mark.beierl@dell.com> | 2017-02-24 14:29:08 -0500 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-02-24 15:52:40 -0500 |
commit | f99c335a029ad6b3ce09486a12da9e666a710803 (patch) | |
tree | f03da63ce090540b844c8df427ce9c405e576c52 /ci/daily.sh | |
parent | 176b0ff44e6e5b8e3133a5b2fc652fa3850779d8 (diff) |
Fixing final report
Makes the report readable instead of JSON escaped and dumps it
to the Jenkins daily when done.
Change-Id: Ic3788672b185461369e2c41221ae36fc4b45436b
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/daily.sh')
-rwxr-xr-x | ci/daily.sh | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/ci/daily.sh b/ci/daily.sh index 1e01cb8..e12964d 100755 --- a/ci/daily.sh +++ b/ci/daily.sh @@ -101,24 +101,35 @@ export TEST_CASE=snia_steady_state JOB=`$WORKSPACE/ci/start_job.sh \ | awk '/job_id/ {print $2}' | sed 's/"//g'` -JOB_STATUS=`curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" \ - | awk '/Status/ {print $2}' | cut -d\" -f2` +curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" \ + -o $WORKSPACE/ci/job/status.json + +JOB_STATUS=`cat $WORKSPACE/ci/job/status.json | awk '/Status/ {print $2}' | cut -d\" -f2` while [ "$JOB_STATUS" != "Completed" ] do - sleep 60 - curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" - JOB_STATUS=`curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" \ - | awk '/Status/ {print $2}' | cut -d\" -f2` + sleep 600 + mv $WORKSPACE/ci/job/status.json $WORKSPACE/ci/job/old-status.json + curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" \ + -o $WORKSPACE/ci/job/status.json + JOB_STATUS=`cat $WORKSPACE/ci/job/status.json | awk '/Status/ {print $2}' | cut -d\" -f2` + diff $WORKSPACE/ci/job/status.json $WORKSPACE/ci/job/old-status.json >/dev/null + if [ $? -eq 1 ] + then + cat $WORKSPACE/ci/job/status.json + fi done -HREF=`curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=status" \ - | awk '/TestResultURL/ {print $2}' | cut -d\" -f2 | cut -d/ -f4-` - echo "Deleting stack for cleanup" -curl -X DELETE --header 'Accept: application/json' 'http://127.0.0.1:5000/api/v1.0/configurations' +curl -s -X DELETE --header 'Accept: application/json' 'http://127.0.0.1:5000/api/v1.0/configurations' sudo chmod 777 -R $WORKSPACE/ci/job/carbon -echo "Results published to: http://testresults.opnfv.org/test/$HREF" +curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=$JOB&type=metadata" \ + -o $WORKSPACE/ci/job/report.json + +echo ========================================================================== +echo Final report +echo ========================================================================== +cat $WORKSPACE/ci/job/report.json exit 0 |