Ittay Stern | 66af8b9 | 2019-03-11 09:34:34 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | now=$(date +'%Y%-m%d%H%M') |
| 4 | |
| 5 | REPORT_NAME=$1 |
| 6 | VERSION=$2 |
| 7 | ENV=$3 |
| 8 | |
| 9 | 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" |
| 10 | RECIPIENTS2="dl-asdcqa@intl.att.com" |
| 11 | |
| 12 | source ExtentReport/versions.info |
| 13 | if [ -z "$REPORT_NAME" ] |
| 14 | then |
| 15 | source ExtentReport/versions.info |
| 16 | now=$(date +'%Y-%m-%d_%H_%M') |
| 17 | REPORT_NAME="${now}" |
| 18 | VERSION="${osVersion}" |
| 19 | |
| 20 | |
| 21 | fi |
| 22 | |
| 23 | if [[ $env == *"DEV20"* ]] |
| 24 | then |
| 25 | ENV="Nightly" |
| 26 | RECIPIENTS=$RECIPIENTS1 |
| 27 | else |
| 28 | ENV="" |
| 29 | RECIPIENTS=$RECIPIENTS2 |
| 30 | fi |
| 31 | |
| 32 | #REPORT_ZIP_FILE=ExtentReport_${now}.zip |
| 33 | REPORT_FOLDER='ExtentReport' |
| 34 | REPORT_HTML_FILE=${REPORT_FOLDER}/*Report.html |
| 35 | 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 ' |
| 36 | |
| 37 | #OLD_FILE=$(find ./ -type f -name ${REPORT_ZIP_FILE} -print) |
| 38 | #if [ ! -z ${OLD_FILE} ] |
| 39 | #then |
| 40 | # rm -f ${REPORT_ZIP_FILE} |
| 41 | # echo "Removing old zip file............" |
| 42 | #fi |
| 43 | |
| 44 | #echo "Creating new zip file" |
| 45 | #zip -r ${REPORT_ZIP_FILE} ./${REPORT_FOLDER} |
| 46 | |
| 47 | |
| 48 | |
| 49 | echo -e ${BODY_MESSAGE} | mail -s 'E2E Automation '$ENV' results - SDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS |