build.sh 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh

# apollo config db info
apollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8
apollo_config_db_username=root
apollo_config_db_password=

# apollo portal db info
apollo_portal_db_url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8
apollo_portal_db_username=root
apollo_portal_db_password=

13
# meta server url, different environments should have different meta server addresses
14
dev_meta=http://localhost:8080
15 16 17
fat_meta=http://someIp:8080
uat_meta=http://anotherIp:8080
pro_meta=http://yetAnotherIp:8080
18 19 20 21

META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta"

# =============== Please do not modify the following content =============== #
22 23 24
# go to script directory
cd "${0%/*}"

25 26 27 28 29
cd ..

# package config-service and admin-service
echo "==== starting to build config-service and admin-service ===="

30
mvn clean package -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
31 32 33 34 35

echo "==== building config-service and admin-service finished ===="

echo "==== starting to build portal ===="

lepdou committed
36
mvn clean package -DskipTests -pl apollo-portal -am -Dapollo_profile=github,auth -Dspring_datasource_url=$apollo_portal_db_url -Dspring_datasource_username=$apollo_portal_db_username -Dspring_datasource_password=$apollo_portal_db_password $META_SERVERS_OPTS
37 38 39 40 41

echo "==== building portal finished ===="

echo "==== starting to build client ===="

42
mvn clean install -DskipTests -pl apollo-client -am $META_SERVERS_OPTS
43

44
echo "==== building client finished ===="
45