This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Description
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-random-ports</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<portNames>
<portName>api.port</portName>
<portName>hcaptcha.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<autoCreateCustomNetworks>true</autoCreateCustomNetworks>
<images>
<image>
<name>${container.registry}/${container.repositorybase}/captcha-validator-service:${project.version}</name>
<alias>service-${docker-container-unique-tag}</alias>
<run>
<network>
<name>network-${docker-container-unique-tag}</name>
<alias>service</alias>
</network>
<namingStrategy>alias</namingStrategy>
<ports>
<port>${api.port}:8080</port>
</ports>
<wait>
<log>Started CaptchValidatorApplication
</log>
<time>120000</time>
</wait>
<dependsOn>
<dependsOn>wiremock-hcaptcha-${docker-container-unique-tag}</dependsOn>
</dependsOn>
<env>
<HCAPTCHASERVICEHOST>http://wiremock-hcaptcha:8080</HCAPTCHASERVICEHOST>
</env>
<log>
<color>blue</color>
</log>
</run>
</image>
<image>
<name>${container.registry}/rodolpheche/wiremock:latest</name>
<alias>wiremock-hcaptcha-${docker-container-unique-tag}</alias>
<run>
<network>
<name>network-${docker-container-unique-tag}</name>
<alias>wiremock-hcaptcha</alias>
</network>
<namingStrategy>alias</namingStrategy>
<ports>
<port>${hcaptcha.port}:8080</port>
</ports>
<volumes>
<bind>
<volume>${project.basedir}/src/test/resources/:/home/wiremock</volume>
</bind>
</volumes>
<hostname>localhost</hostname>
<wait>
<time>5000</time>
</wait>
<log>
<prefix>%a</prefix>
<color>magenta</color>
</log>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!--suppress MavenModelInspection property exposed by docker-maven-plugin-->
<api.root>http://localhost:${api.port}</api.root>
<api.wiremock-hcaptcha-port>${hcaptcha.port}</api.wiremock-hcaptcha-port>
<management.root>http://localhost:${management.port}</management.root>
<api.use-local-wiremocks>false</api.use-local-wiremocks>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>