diff --git a/Jenkinsfile b/Jenkinsfile
index 5979f83..2637920 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,7 +24,7 @@ pipeline {
stages {
stage('Default Build pointing to Staging DB') {
steps {
- sh "mvn clean package -DskipTests -DbuildDirectory=staging/target -DegaAcccession-db.url=${stagingPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAcccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-staging -Dddl-behaviour=${params.DbBehaviour}"
+ sh "mvn clean package -DskipTests -DbuildDirectory=staging/target -DegaAccession-db.url=${stagingPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-staging -Dddl-behaviour=${params.DbBehaviour}"
}
}
stage('Build For FallBack And Production') {
@@ -35,9 +35,9 @@ pipeline {
}
steps {
echo 'Build pointing to FallBack DB'
- sh "mvn clean package -DskipTests -DbuildDirectory=fallback/target -DegaAcccession-db.url=${fallBackPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAcccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-fallback -Dddl-behaviour=${params.DbBehaviour}"
+ sh "mvn clean package -DskipTests -DbuildDirectory=fallback/target -DegaAccession-db.url=${fallBackPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-fallback -Dddl-behaviour=${params.DbBehaviour}"
echo 'Build pointing to Production DB'
- sh "mvn clean package -DskipTests -DbuildDirectory=production/target -DegaAcccession-db.url=${productionPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAcccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-production -Dddl-behaviour=${params.DbBehaviour}"
+ sh "mvn clean package -DskipTests -DbuildDirectory=production/target -DegaAccession-db.url=${productionPostgresDbUrl} -DegaAccession-db.username=${postgresDBUserName} -DegaAccession-db.password=${postgresDBPassword} -Dinstance.id=ega-accession-01-production -Dddl-behaviour=${params.DbBehaviour}"
}
}
stage('Deploy To Staging') {
diff --git a/pom.xml b/pom.xml
index d09c7c3..27cb4b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
uk.ac.ebi.ega
accessioning-service
1.0-SNAPSHOT
- war
+ ${packaging.type}
accessioning-service
http://github.com/EBIvariation/ega-accession
@@ -14,6 +14,7 @@
5.2.17.Final
UTF-8
${project.basedir}/target
+ war
@@ -34,14 +35,19 @@
0.6-SNAPSHOT
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+ 1.4.6.RELEASE
+
org.springframework.boot
spring-boot-starter-web
-
- org.springframework.boot
- spring-boot-starter-tomcat
- provided
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
org.springframework.boot
@@ -119,6 +125,10 @@
1.8
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
org.apache.maven.plugins
maven-surefire-plugin
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index eaeeb76..f624eac 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -18,7 +18,7 @@
#####################################################################################
# SPRING-CORE
#####################################################################################
-spring.application.name=EGA accession service
+spring.application.name=ega-accession-service
# Bean jmx domain when using multiple applications with tomcat.
spring.jmx.default-domain=ega-accession
endpoints.jmx.domain=ega-accession
@@ -26,10 +26,11 @@ endpoints.jmx.domain=ega-accession
# DATABASES
#####################################################################################
spring.jpa.hibernate.use-new-id-generator-mappings=true
-spring.datasource.url=@egaAcccession-db.url@
+spring.datasource.url=@egaAccession-db.url@
spring.datasource.username=@egaAccession-db.username@
-spring.datasource.password=@egaAcccession-db.password@
+spring.datasource.password=@egaAccession-db.password@
spring.jpa.hibernate.ddl-auto=@ddl-behaviour@
+spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL94Dialect
spring.jpa.generate-ddl=true
#####################################################################################
# ACTUATOR
@@ -95,3 +96,13 @@ accessioning.monotonic.array.nextBlockInterval=0
accessioning.monotonic.sample.blockSize=1000
accessioning.monotonic.sample.blockStartValue=0
accessioning.monotonic.sample.nextBlockInterval=0
+
+#####################################################################################
+# Local Eureka
+#####################################################################################
+eureka.name=accessionService
+eureka.port=8761
+eureka.vipAddress=
+eureka.serviceUrls=
+eureka.client.serviceUrl.defaultZone=
+eureka.instance.preferIpAddress=true
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index 9b9f8e5..0ebe1c7 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -67,4 +67,7 @@ accessioning.monotonic.array.nextBlockInterval=0
accessioning.monotonic.sample.blockSize=1000
accessioning.monotonic.sample.blockStartValue=0
-accessioning.monotonic.sample.nextBlockInterval=0
\ No newline at end of file
+accessioning.monotonic.sample.nextBlockInterval=0
+
+# disable eureka for test
+eureka.client.enabled=false