Merge pull request #4749 from wyvie/springboot-testing-fix

[KEYCLOAK-3837] added additional profile to springboot prod testing
This commit is contained in:
Pavel Drozd 2017-11-29 00:05:21 +01:00 committed by GitHub
commit c02c07d78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,7 @@
<adapter.container>tomcat</adapter.container> <adapter.container>tomcat</adapter.container>
<repo.argument /> <repo.argument />
<maven.settings.file />
</properties> </properties>
<dependencies> <dependencies>
@ -64,9 +65,12 @@
<configuration> <configuration>
<name>springboot</name> <name>springboot</name>
<workingDir>../../../../test-apps/spring-boot-adapter</workingDir> <workingDir>../../../../test-apps/spring-boot-adapter</workingDir>
<healthcheckUrl>http://localhost:8280/index.html</healthcheckUrl>
<waitAfterLaunch>360</waitAfterLaunch>
<arguments> <arguments>
<argument>mvn</argument> <argument>mvn</argument>
<argument>spring-boot:run</argument> <argument>spring-boot:run</argument>
<argument>-B</argument>
<argument>-Dkeycloak.version=${project.version}</argument> <argument>-Dkeycloak.version=${project.version}</argument>
<argument>-Pspring-boot-adapter-${adapter.container}</argument> <argument>-Pspring-boot-adapter-${adapter.container}</argument>
<argument>-Dmaven.repo.local=${settings.localRepository}</argument> <argument>-Dmaven.repo.local=${settings.localRepository}</argument>
@ -88,6 +92,56 @@
</build> </build>
</profile> </profile>
<profile>
<id>test-springboot-prod</id>
<properties>
<exclude.springboot>-</exclude.springboot>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.bazaarvoice.maven.plugins</groupId>
<artifactId>process-exec-maven-plugin</artifactId>
<version>0.7</version>
<executions>
<execution>
<id>spring-boot-application-process</id>
<phase>generate-test-resources</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<name>springboot</name>
<workingDir>../../../../test-apps/spring-boot-adapter</workingDir>
<healthcheckUrl>http://localhost:8280/index.html</healthcheckUrl>
<waitAfterLaunch>360</waitAfterLaunch>
<arguments>
<argument>mvn</argument>
<argument>spring-boot:run</argument>
<argument>-B</argument>
<argument>-s</argument>
<argument>${maven.settings.file}</argument>
<argument>-Dkeycloak.version=${project.version}</argument>
<argument>-Pspring-boot-adapter-${adapter.container}</argument>
<argument>-Dmaven.repo.local=${settings.localRepository}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>kill-processes</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-all</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile> <profile>
<id>turn-on-repo-url</id> <id>turn-on-repo-url</id>
<activation> <activation>