-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-prod.sh
executable file
·59 lines (45 loc) · 1.38 KB
/
deploy-prod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Deploys all of the microservices for the MasterCard demo
# Make sure you're targeted and logged in to the right CF endpoint
# prior to running this script.
# Change the SKIP_TESTS variable to whether or not you want to run tests as
# part of the build.
export CURRENT_DIR=`pwd`
export SKIP_TESTS=true
echo "***********************"
echo "Start production deploy"
date
echo "***********************"
if [ "-p" == "$1" ]; then
echo "Adding phpmyadmin consoles..."
fi
echo "Creating services as needed"
./create-services.sh
echo "Building and deploying eureka-server"
cd "$CURRENT_DIR/eureka-server"
mvn clean package -Dmaven.test.skip=$SKIP_TESTS
cf push
echo "Building and deploying push-notification"
cd "$CURRENT_DIR/push-notification"
mvn clean package -Dmaven.test.skip=$SKIP_TESTS
cf push
echo "Building and deploying payment-service"
cd "$CURRENT_DIR/payment-service"
mvn clean package -Dmaven.test.skip=$SKIP_TESTS
cf push
echo "Building and deploying payment-history-service"
cd "$CURRENT_DIR/payment-history-service"
mvn clean package -Dmaven.test.skip=$SKIP_TESTS
cf push
echo "Building and deploying payments"
cd "$CURRENT_DIR/api-gateway"
mvn clean package -Dmaven.test.skip=$SKIP_TESTS
cf push
if [ "-p" == "$1" ]; then
source ./deploy-php-prod.sh
fi
cd "$CURRENT_DIR"
echo "***********************"
echo "End production deploy"
date
echo "***********************"