summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/resources/ci/scripts/sendMail.sh
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-03-11 09:34:34 +0200
committerIttay Stern <ittay.stern@att.com>2019-03-17 17:02:43 +0200
commit66af8b9b391879be78660d6ccb0a1f1f9340b423 (patch)
treefc0d510f7ea28a437bcb1e3b950d1281ac88a4e4 /vid-automation/src/main/resources/ci/scripts/sendMail.sh
parent37ad0cc1d36ec6ff68ec39fcaaf2617eef7d08fe (diff)
Merge automation from ECOMP's repository
Reference commit in ECOMP: 8e92a8c6 Issue-ID: VID-378 Change-Id: Ia32f4813378ef95097f788246aa5b1172e20ca48 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/resources/ci/scripts/sendMail.sh')
-rw-r--r--vid-automation/src/main/resources/ci/scripts/sendMail.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/vid-automation/src/main/resources/ci/scripts/sendMail.sh b/vid-automation/src/main/resources/ci/scripts/sendMail.sh
new file mode 100644
index 000000000..794534fc8
--- /dev/null
+++ b/vid-automation/src/main/resources/ci/scripts/sendMail.sh
@@ -0,0 +1,49 @@
+#!/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
+ source ExtentReport/versions.info
+ now=$(date +'%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}'/UI/'${REPORT_NAME}'/SDC_UI_Extent_Report.html \n\nThanks, \nASDC 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 'E2E Automation '$ENV' results - SDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS