summaryrefslogtreecommitdiffstats
path: root/jjb/global
diff options
context:
space:
mode:
authorJulien <zhang.jun3g@zte.com.cn>2017-12-07 01:52:04 -0800
committerJulien <zhang.jun3g@zte.com.cn>2018-01-15 22:13:44 +0800
commit36b4348e88e2dc2f8a53fa3b9d053aa0bd25abb9 (patch)
tree353583a6c2c117911b9b4ba43efcfd0ec471ae82 /jjb/global
parenta6ad912d1f7ec888a077615f3ae14efa51931dc3 (diff)
Add macro for reporting the provision result
1. add macro for report the provision result of installers and try it in daisy 2. update according to TestAPI interface Change-Id: Ic041744c917c37fcd84a12a92e927e39106cf18f Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
Diffstat (limited to 'jjb/global')
-rwxr-xr-xjjb/global/installer-report.sh25
-rw-r--r--jjb/global/releng-macros.yml26
2 files changed, 51 insertions, 0 deletions
diff --git a/jjb/global/installer-report.sh b/jjb/global/installer-report.sh
new file mode 100755
index 000000000..e2fcfd6f6
--- /dev/null
+++ b/jjb/global/installer-report.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+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
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index aeeb24610..c2cff3261 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -431,6 +431,12 @@
- shell: |
find $WORKSPACE -type f -name '*.log' | xargs rm -f
+- builder:
+ name: track-begin-timestamp
+ builders:
+ - shell: |
+ echo "export TIMESTAMP_START="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
+
- publisher:
name: archive-artifacts
publishers:
@@ -971,3 +977,23 @@
<<: *email_ptl_defaults
recipients: >
ross.b.brattain@intel.com
+
+- publisher:
+ name: 'report-provision-result'
+ publishers:
+ - postbuildscript:
+ script-only-if-succeeded: true
+ builders:
+ - shell: |
+ echo "export PROVISION_RESULT=SUCCEED" >> $WORKSPACE/installer_track.sh
+ echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+ - shell:
+ !include-raw-escape: installer-report.sh
+ - postbuildscript:
+ script-only-if-failed: true
+ builders:
+ - shell: |
+ echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
+ echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+ - shell:
+ !include-raw-escape: installer-report.sh