Fix concurrent build 84/74484/1
authorsebdet <sebastien.determe@intl.att.com>
Tue, 11 Dec 2018 11:39:11 +0000 (12:39 +0100)
committersebdet <sebastien.determe@intl.att.com>
Tue, 11 Dec 2018 11:39:11 +0000 (12:39 +0100)
Fix concurrent build issue that may occur and generate random ports
automatically in the build

Issue-ID: CLAMP-252
Change-Id: If1b67a3a03fea52971b494621a4ba3ba44ee6a01
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
pom.xml
src/main/resources/application.properties
src/test/resources/application.properties
src/test/resources/https/https-test.properties

diff --git a/pom.xml b/pom.xml
index 124bee4..8e7f6aa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
-                               <docker.mariadb.port.host>3306</docker.mariadb.port.host>
-                               <docker.http-cache.port.host>8085</docker.http-cache.port.host>
                                <project.scm.id>git-server</project.scm.id>
                                <java.version>1.8</java.version>
 
                                <eelf.core.version>1.0.0</eelf.core.version>
-                               <camel.version>2.22.0</camel.version>
+                               <camel.version>2.22.1</camel.version>
                                <springboot.version>2.0.6.RELEASE</springboot.version>
                                
                                <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
                                </resources>
 
                                <plugins>
+                                               <plugin>
+                                                       <groupId>org.sonatype.plugins</groupId>
+                                                       <artifactId>port-allocator-maven-plugin</artifactId>
+                                                       <version>1.2</version>
+                                                       <executions>
+                                                               <execution>
+                                                                       <phase>validate</phase>
+                                                                       <goals>
+                                                                               <goal>allocate-ports</goal>
+                                                                       </goals>
+                                                                       <configuration>
+                                                                               <ports>
+                                                                                       <port>
+                                                                                               <name>docker.mariadb.port.host</name>
+                                                                                       </port>
+                                                                                       <port>
+                                                                                               <name>docker.http-cache.port.host</name>
+                                                                                       </port>
+                                                                                       <port>
+                                                                                               <name>clamp.it.tests.https</name>
+                                                                                       </port>
+                                                                                       <port>
+                                                                                               <name>clamp.it.tests.http</name>
+                                                                                       </port>
+                                                                               </ports>
+                                                                       </configuration>
+                                                               </execution>
+                                                       </executions>
+                                               </plugin>
                                                <!-- Read the swagger.json file and the definition from SwaggerConfig.java; 
                                                        generate a list of .adoc files containing the APIs info in more structured 
                                                        way -->
index 28779af..ef4c4fc 100644 (file)
@@ -99,7 +99,7 @@ camel.springboot.xmlRests=classpath:/clds/camel/rest/*.xml
 
 #clds datasource connection details
 spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver
-spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3
+spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:3306/cldsdb4?autoReconnect=true&connectTimeout=10000&socketTimeout=10000&retriesAllDown=3
 spring.datasource.cldsdb.username=clds
 spring.datasource.cldsdb.password=4c90a0b48204383f4283448d23e0b885a47237b2a23588e7c4651604f51c1067
 spring.datasource.cldsdb.validationQuery=SELECT 1
index 8d6cd38..7116940 100644 (file)
@@ -30,7 +30,7 @@ info.build.version=@project.version@
 ### (See below for the parameter 'server.http.port' if you want to have both enabled)\r
 ### To have only HTTP, keep the lines server.ssl.* commented\r
 ### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location\r
-server.port=8080\r
+server.port=${clamp.it.tests.http}\r
 ### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port')\r
 #server.ssl.key-store=file:/tmp/mykey.jks\r
 #server.ssl.key-store-password=pass\r
index e15ea6e..34b7222 100644 (file)
@@ -25,7 +25,7 @@
 ### (See below for the parameter 'server.http.port' if you want to have both enabled) 
 ### To have only HTTP, keep the lines server.ssl.* commented
 ### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location
-server.port=10443
+server.port=${clamp.it.tests.https}
 ### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port') 
 server.ssl.key-store=classpath:https/keystore-test.jks
 server.ssl.key-store-password=testpass