Michael Lando | b3d4898 | 2017-06-11 14:22:02 +0300 | [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 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 9 | RECIPIENTS1="md9897@att.com,NETCOM_ASDC_DEV@att.com,IL-D2-QA-Alex@att.com,bs5719@att.com,yg356h@att.com,yr9970@att.com,sl615n@att.com,yn813h@att.com,as221v@att.com,ms172g@att.com,ma2244@att.com,el489u@att.com,gg980r@att.com,ak991p@att.com,bv095y@att.com,ms656r@att.com,df502y@att.com,bt750h@att.com,ln699k@att.com,hm104p@att.com" |
Michael Lando | a544510 | 2018-03-04 14:53:33 +0200 | [diff] [blame] | 10 | #RECIPIENTS2="dl-asdcqa@intl.att.com" |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 11 | RECIPIENTS2="md9897@att.com,NETCOM_ASDC_DEV@att.com,IL-D2-QA-Alex@att.com,bs5719@att.com,yg356h@att.com,yr9970@att.com,sl615n@att.com,yn813h@att.com,as221v@att.com,ms172g@att.com,ma2244@att.com,el489u@att.com,gg980r@att.com,ak991p@att.com,bv095y@att.com,ms656r@att.com,df502y@att.com,bt750h@att.com,ln699k@att.com,hm104p@att.com" |
Michael Lando | b3d4898 | 2017-06-11 14:22:02 +0300 | [diff] [blame] | 12 | source ExtentReport/versions.info |
| 13 | if [ -z "$REPORT_NAME" ] |
| 14 | then |
| 15 | now=$(date -d '+7 hour' "+%Y-%m-%d_%H_%M") |
| 16 | REPORT_NAME="${now}" |
| 17 | VERSION="${osVersion}" |
| 18 | fi |
| 19 | |
| 20 | if [[ $env == *"DEV20"* ]] |
| 21 | then |
| 22 | ENV="Nightly" |
| 23 | RECIPIENTS=$RECIPIENTS1 |
| 24 | else |
| 25 | ENV="" |
| 26 | RECIPIENTS=$RECIPIENTS2 |
| 27 | fi |
| 28 | |
| 29 | |
| 30 | #REPORT_ZIP_FILE=ExtentReport_${now}.zip |
| 31 | REPORT_FOLDER='ExtentReport' |
| 32 | REPORT_HTML_FILE=${REPORT_FOLDER}/*Report.html |
| 33 | 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 ' |
| 34 | |
| 35 | #OLD_FILE=$(find ./ -type f -name ${REPORT_ZIP_FILE} -print) |
| 36 | #if [ ! -z ${OLD_FILE} ] |
| 37 | #then |
| 38 | # rm -f ${REPORT_ZIP_FILE} |
| 39 | # echo "Removing old zip file............" |
| 40 | #fi |
| 41 | |
| 42 | #echo "Creating new zip file" |
| 43 | #zip -r ${REPORT_ZIP_FILE} ./${REPORT_FOLDER} |
| 44 | |
| 45 | |
| 46 | echo -e ${BODY_MESSAGE} | mail -s 'External APIs Automation '$ENV' results - ASDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS |