Selaa lähdekoodia

Update jenkins build

Yiming Liu 9 vuotta sitten
vanhempi
commit
ab6baf9cf6

+ 0 - 2
.gitignore

@@ -24,5 +24,3 @@ target
 
 # git
 *.orig
-
-application-dev.properties

+ 3 - 2
apollo-adminservice/src/main/scripts/shutdown.sh

@@ -2,5 +2,6 @@
 SERVICE_NAME=apollo-adminservice
 
 cd `dirname $0`/..
-./$SERVICE_NAME".jar" stop
-
+if [[ -f $SERVICE_NAME".jar" ]]; then
+  ./$SERVICE_NAME".jar" stop
+fi

+ 0 - 4
apollo-biz/src/main/resources/application-dev.example.properties

@@ -1,4 +0,0 @@
-# DataSource
-spring.datasource.url = 
-spring.datasource.username = 
-spring.datasource.password = 

+ 4 - 0
apollo-biz/src/main/resources/application-dev.properties

@@ -0,0 +1,4 @@
+# DataSource
+spring.datasource.url = ${spring_datasource_url}
+spring.datasource.username = ${spring_datasource_username}
+spring.datasource.password = ${spring_datasource_password}

+ 24 - 0
apollo-buildtools/pom.xml

@@ -20,4 +20,28 @@
 			<artifactId>cat-client</artifactId>
 		</dependency>
 	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>validate</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>${basedir}/target</outputDirectory>
+							<resources>
+								<resource>
+									<directory>src/main/scripts</directory>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
 </project>

+ 2 - 2
apollo-buildtools/src/main/scripts/deploy_jenkins.sh

@@ -28,10 +28,10 @@ APP_NAME=$1
 APP_DIR=$APP_BASE_DIR/$APP_NAME
 APP_RELEASE_DIR=$APP_BASE_DIR/apollo-$APP_NAME.releases/`date "+%Y-%m-%d.%H.%M.%S"`
 APP_STARTUP_SCRIPT=$APP_DIR/bin/startup.sh
-APP_SHUTDOWN_SCRIPTS=$APP_DIR/bin/shutdown.sh
+APP_SHUTDOWN_SCRIPT=$APP_DIR/bin/shutdown.sh
 
 if [ -e $APP_STARTUP_SCRIPT ];then
-	$APP_SHUTDOWN_SCRIPTS
+	$APP_SHUTDOWN_SCRIPT
 fi
 
 mkdir -p $APP_RELEASE_DIR

+ 3 - 1
apollo-configservice/src/main/scripts/shutdown.sh

@@ -2,4 +2,6 @@
 SERVICE_NAME=apollo-configservice
 
 cd `dirname $0`/..
-./$SERVICE_NAME".jar" stop
+if [[ -f $SERVICE_NAME".jar" ]]; then
+  ./$SERVICE_NAME".jar" stop
+fi

+ 3 - 1
apollo-portal/src/main/scripts/shutdown.sh

@@ -2,4 +2,6 @@
 SERVICE_NAME=apollo-portal
 
 cd `dirname $0`/..
-./$SERVICE_NAME".jar" stop
+if [[ -f $SERVICE_NAME".jar" ]]; then
+  ./$SERVICE_NAME".jar" stop
+fi

+ 7 - 2
pom.xml

@@ -292,6 +292,11 @@
 					<artifactId>maven-release-plugin</artifactId>
 					<version>2.5.3</version>
 				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-jar-plugin</artifactId>
+					<version>2.6</version>
+				</plugin>
 			</plugins>
 		</pluginManagement>
 		<plugins>
@@ -369,9 +374,9 @@
 			</build>
 		</profile>
 		<profile>
-			<id>local</id>
+			<id>dev</id>
 			<properties>
-				<package.environment>local</package.environment>
+				<package.environment>dev</package.environment>
 			</properties>
 			<activation>
 				<activeByDefault>true</activeByDefault>