summaryrefslogtreecommitdiffstats
path: root/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-11 14:22:02 +0300
committerMichael Lando <ml636r@att.com>2017-06-11 17:48:32 +0300
commitb3d4898d9e8452ea0b8d848c048e712d43b8d9a3 (patch)
tree0609319203be13f6c29ccbe24cb39c9d64f90095 /test-apis-ci/src/main/resources/ci/scripts/sendMail.sh
parentaf9929df75604ce407d0ca542b200630164e0ae6 (diff)
[SDC-29] rebase continue work to align source
Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'test-apis-ci/src/main/resources/ci/scripts/sendMail.sh')
-rw-r--r--test-apis-ci/src/main/resources/ci/scripts/sendMail.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh b/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh
new file mode 100644
index 0000000000..4c23a7973e
--- /dev/null
+++ b/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+now=$(date +'%Y%-m%d%H%M')
+
+REPORT_NAME=$1
+VERSION=$2
+ENV=$3
+
+RECIPIENTS1="dl-sdcqa@intl.att.com,ml636r@intl.att.com,bl5783intl.att.com,ak314p@intl.att.com,el489u@intl.att.com,hk096q@intl.att.com,bs5719@intl.att.com"
+RECIPIENTS2="dl-asdcqa@intl.att.com"
+
+source ExtentReport/versions.info
+if [ -z "$REPORT_NAME" ]
+ then
+ now=$(date -d '+7 hour' "+%Y-%m-%d_%H_%M")
+ REPORT_NAME="${now}"
+ VERSION="${osVersion}"
+fi
+
+if [[ $env == *"DEV20"* ]]
+ then
+ ENV="Nightly"
+ RECIPIENTS=$RECIPIENTS1
+ else
+ ENV=""
+ RECIPIENTS=$RECIPIENTS2
+fi
+
+
+#REPORT_ZIP_FILE=ExtentReport_${now}.zip
+REPORT_FOLDER='ExtentReport'
+REPORT_HTML_FILE=${REPORT_FOLDER}/*Report.html
+BODY_MESSAGE='Hello, \n\n Please find automation results on following link: \n\n http://asdc-srv-210-45.tlv.intl.att.com/'${ENV}'/'${VERSION}'/APIs/'${REPORT_NAME}'/SDC_CI_Extent_Report.html \n\nThanks, \nSDC QA Team\n\n '
+
+#OLD_FILE=$(find ./ -type f -name ${REPORT_ZIP_FILE} -print)
+#if [ ! -z ${OLD_FILE} ]
+#then
+# rm -f ${REPORT_ZIP_FILE}
+# echo "Removing old zip file............"
+#fi
+
+#echo "Creating new zip file"
+#zip -r ${REPORT_ZIP_FILE} ./${REPORT_FOLDER}
+
+
+echo -e ${BODY_MESSAGE} | mail -s 'External APIs Automation '$ENV' results - ASDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS