diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-03-05 07:12:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-05 07:12:35 +0000 |
commit | 7813c1d260a1bd22109f696883bbaa3c99bf1bb9 (patch) | |
tree | 5d5973f374dd93658e296c809612b449fc35dae1 /jjb/global/installer-report.sh | |
parent | f832a32e30babffa2d8c71b4102af01c7eaebbf2 (diff) | |
parent | 75ad4675169be0fcabc903f47bd8016656169434 (diff) |
Merge "Report the result to TestAPI"
Diffstat (limited to 'jjb/global/installer-report.sh')
-rwxr-xr-x | jjb/global/installer-report.sh | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/jjb/global/installer-report.sh b/jjb/global/installer-report.sh index e2fcfd6f6..c9c730594 100755 --- a/jjb/global/installer-report.sh +++ b/jjb/global/installer-report.sh @@ -8,18 +8,29 @@ ############################################################################## source $WORKSPACE/installer_track.sh -echo """ - INSTALLER: $INSTALLER - INSTALLER_VERSION: $INSTALLER_VERSION - JOB_NAME: $JOB_NAME - BUILD_ID: $BUILD_ID - SENARIO: $DEPLOY_SCENARIO - UPSTREAM_JOB_NAME: $UPSTREAM_JOB_NAME: - UPSTREAM_BUILD_ID: $UPSTREAM_BUILD_ID - PROVISION_RESULT: $PROVISION_RESULT - TIMESTAMP_START: $TIMESTAMP_START - TIMESTAMP_END: `date '+%Y-%m-%d %H:%M:%S.%3N'` - POD_NAME: $NODE_NAME -""" -# TODO call TestAPI to report installer provisoin result when API is ready +gen_content() +{ + cat <<EOF +{ + "installer": "$INSTALLER", + "version": "$INSTALLER_VERSION", + "pod_name": "$POD_NAME", + "job_name": "$JOB_NAME", + "build_id": "$BUILD_ID", + "scenario": "$SCENARIO", + "upstream_job_name": "$UPSTREAM_JOB_NAME", + "upstream_build_id":"$UPSTREAM_BUILD_ID", + "criteria": "$PROVISION_RESULT", + "start_date": "$TIMESTAMP_START", + "stop_date": "$TIMESTAMP_END", + "details":"" +} +EOF +} + +echo "Installer: $INSTALLER provision result: $PROVISION_RESULT" +echo $(gen_content) + +set -o xtrace +curl -H "Content-Type: application/json" -X POST -v -d "$(gen_content)" $TESTAPI_URL/deployresults |