Subversion Repositories SmartDukaan

Rev

Rev 5042 | Rev 5668 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5042 Rev 5103
Line 5... Line 5...
5
TOEMAIL="mandeep.dhir@shop2020.in,rajveer.singh@shop2020.in,pankaj.kankar@shop2020.in,anupam.singh@shop2020.in"
5
TOEMAIL="mandeep.dhir@shop2020.in,rajveer.singh@shop2020.in,pankaj.kankar@shop2020.in,anupam.singh@shop2020.in"
6
MESSAGE=""
6
MESSAGE=""
7
FILE="/var/log/build-staging.log"
7
FILE="/var/log/build-staging.log"
8
SHOP2020_SERVER="shop2020"
8
SHOP2020_SERVER="shop2020"
9
DATE=`date +%Y-%b-%d-%Hh%Mm%Ss`
9
DATE=`date +%Y-%b-%d-%Hh%Mm%Ss`
-
 
10
MAVEN_REPO="${HOME}/.m2/repository"
10
 
11
 
11
build()
12
build()
12
{
13
{
13
  /opt/apache-maven-3.0.3/bin/mvn clean install -P minify -Ddomain.name=shop2020.in -Denv=staging >>$FILE 2>&1;
14
  /opt/apache-maven-3.0.3/bin/mvn clean install -P minify -Ddomain.name=shop2020.in -Denv=staging >>$FILE 2>&1;
14
  OUT=$?
15
  OUT=$?
Line 59... Line 60...
59
}
60
}
60
 
61
 
61
sendmail()
62
sendmail()
62
{
63
{
63
  if [ $OUT -eq 0 ];then
64
  if [ $OUT -eq 0 ];then
64
    SUBJECT="Build and deployment is successful"
65
    SUBJECT="Build and deployment is successful on shop2020"
65
  else
66
  else
66
    SUBJECT="Build failed or deployment failed."
67
    SUBJECT="Build failed or deployment failed."
67
  fi
68
  fi
68
 
69
 
69
  sendEmail -f "$FROMEMAIL" -s smtp.gmail.com:587 -xu "$FROMEMAIL" -xp "$FROMPASSWORD" -t $TOEMAIL -o tls=yes -u "$SUBJECT" -m "$MESSAGE" -a $FILE
70
  sendEmail -f "$FROMEMAIL" -s smtp.gmail.com:587 -xu "$FROMEMAIL" -xp "$FROMPASSWORD" -t $TOEMAIL -o tls=yes -u "$SUBJECT" -m "$MESSAGE" -a $FILE