Skip to content

Commit

Permalink
adapt for github deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam committed Oct 22, 2016
1 parent b1d719a commit 78e058a
Show file tree
Hide file tree
Showing 8 changed files with 703 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apollo-adminservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
application:
name: apollo-adminservice
profiles:
active: ctrip
active: ${apollo_profile}

ctrip:
appid: 100003172
Expand Down
2 changes: 1 addition & 1 deletion apollo-assembly/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
profiles:
active: ctrip
active: ${apollo_profile}

logging:
level:
Expand Down
2 changes: 1 addition & 1 deletion apollo-configservice/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
application:
name: apollo-configservice
profiles:
active: ctrip
active: ${apollo_profile}

ctrip:
appid: 100003171
Expand Down
15 changes: 15 additions & 0 deletions apollo-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,19 @@
</dependency>
<!-- end of log -->
</dependencies>
<profiles>
<profile>
<id>github</id>
<properties>
<package.environment>github</package.environment>
</properties>
<dependencies>
<!-- disable cat for outside use -->
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-buildtools</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion apollo-portal/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
application:
name: apollo-portal
profiles:
active: ctrip
active: ${apollo_profile}

ctrip:
appid: 100003173
Expand Down
44 changes: 44 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/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=

# meta server url
dev_meta=http://localhost:8080
fat_meta=http://localhost:8080
uat_meta=http://localhost:8080
pro_meta=http://localhost:8080

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 =============== #
cd ..

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

mvn clean package -DskipTests -pl apollo-configservice,apollo-adminservice -am -Pgithub -Dapollo_profile=dev -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password

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

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

mvn clean package -DskipTests -pl apollo-portal -am -Pgithub -Dapollo_profile=dev -Dspring_datasource_url=$apollo_portal_db_url -Dspring_datasource_username=$apollo_portal_db_username -Dspring_datasource_password=$apollo_portal_db_password $META_SERVERS_OPTS

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

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

mvn clean install -DskipTests -pl apollo-client -am -Pgithub $META_SERVERS_OPTS

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



Loading

0 comments on commit 78e058a

Please sign in to comment.