build.sh 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. #
  3. # Copyright 2023 Apollo Authors
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # apollo config db info
  18. apollo_config_db_url='jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8'
  19. apollo_config_db_username='FillInCorrectUser'
  20. apollo_config_db_password='FillInCorrectPassword'
  21. # apollo portal db info
  22. apollo_portal_db_url='jdbc:mysql://fill-in-the-correct-server:3306/ApolloPortalDB?characterEncoding=utf8'
  23. apollo_portal_db_username='FillInCorrectUser'
  24. apollo_portal_db_password='FillInCorrectPassword'
  25. # meta server url, different environments should have different meta server addresses
  26. dev_meta=http://fill-in-dev-meta-server:8080
  27. fat_meta=http://fill-in-fat-meta-server:8080
  28. uat_meta=http://fill-in-uat-meta-server:8080
  29. pro_meta=http://fill-in-pro-meta-server:8080
  30. META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta"
  31. # =============== Please do not modify the following content =============== #
  32. # go to script directory
  33. cd "${0%/*}" || exit
  34. cd ..
  35. # package config-service and admin-service
  36. echo "==== starting to build config-service and admin-service ===="
  37. 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
  38. echo "==== building config-service and admin-service finished ===="
  39. echo "==== starting to build portal ===="
  40. 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
  41. echo "==== building portal finished ===="