build.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # apollo config db info
  3. apollo_config_db_url=jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8
  4. apollo_config_db_username=FillInCorrectUser
  5. apollo_config_db_password=FillInCorrectPassword
  6. # apollo portal db info
  7. apollo_portal_db_url=jdbc:mysql://fill-in-the-correct-server:3306/ApolloPortalDB?characterEncoding=utf8
  8. apollo_portal_db_username=FillInCorrectUser
  9. apollo_portal_db_password=FillInCorrectPassword
  10. # meta server url, different environments should have different meta server addresses
  11. dev_meta=http://fill-in-dev-meta-server:8080
  12. fat_meta=http://fill-in-fat-meta-server:8080
  13. uat_meta=http://fill-in-uat-meta-server:8080
  14. pro_meta=http://fill-in-pro-meta-server:8080
  15. META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta"
  16. # =============== Please do not modify the following content =============== #
  17. # go to script directory
  18. cd "${0%/*}"
  19. cd ..
  20. # package config-service and admin-service
  21. echo "==== starting to build config-service and admin-service ===="
  22. 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
  23. echo "==== building config-service and admin-service finished ===="
  24. echo "==== starting to build portal ===="
  25. 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
  26. echo "==== building portal finished ===="