summaryrefslogtreecommitdiffstats
path: root/jjb/global
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/global')
-rwxr-xr-xjjb/global/installer-report.sh16
-rw-r--r--jjb/global/releng-macros.yml6
2 files changed, 17 insertions, 5 deletions
diff --git a/jjb/global/installer-report.sh b/jjb/global/installer-report.sh
index c9c730594..6cd83f1f1 100755
--- a/jjb/global/installer-report.sh
+++ b/jjb/global/installer-report.sh
@@ -15,10 +15,10 @@ gen_content()
{
"installer": "$INSTALLER",
"version": "$INSTALLER_VERSION",
- "pod_name": "$POD_NAME",
+ "pod_name": "$NODE_NAME",
"job_name": "$JOB_NAME",
"build_id": "$BUILD_ID",
- "scenario": "$SCENARIO",
+ "scenario": "$DEPLOY_SCENARIO",
"upstream_job_name": "$UPSTREAM_JOB_NAME",
"upstream_build_id":"$UPSTREAM_BUILD_ID",
"criteria": "$PROVISION_RESULT",
@@ -33,4 +33,14 @@ 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
+curl -H "Content-Type: application/json" -X POST -v -d "$(gen_content)" \
+ $TESTAPI_URL/deployresults || true
+
+# INFO
+# postbuildscript plugin shall always return the original job running status,
+# for the result returned from postbuildscript affects the CI pipeline.
+if [ "$PROVISION_RESULT" == "PASS" ]; then
+ exit 0
+else
+ exit 1
+fi
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index e172d856b..8f032345e 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -965,7 +965,8 @@
builders:
- shell: |
echo "export PROVISION_RESULT=PASS" >> $WORKSPACE/installer_track.sh
- echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+ echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+ echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
- shell:
!include-raw: installer-report.sh
- postbuildscript:
@@ -974,6 +975,7 @@
builders:
- shell: |
echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
- echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+ echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+ echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
- shell:
!include-raw: installer-report.sh