diff options
author | Pawel <pawel.kasperkiewicz@nokia.com> | 2020-02-10 13:03:38 +0100 |
---|---|---|
committer | Pawel <pawel.kasperkiewicz@nokia.com> | 2020-02-10 15:40:41 +0100 |
commit | 8b1072c09e60828433903d2e0cd1eaffaf8c4aa0 (patch) | |
tree | 532b29cb782a4bc47ff86509720b1e1de1df7e67 /certService/pom.xml | |
parent | 486429d47ff93e3aa6f9a012f98198cac69a4655 (diff) |
Add docker image building to maven configuration
Issue-ID: AAF-995
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: I26862c9f2597ff058f869320ebd3948030b63051
Diffstat (limited to 'certService/pom.xml')
-rw-r--r-- | certService/pom.xml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/certService/pom.xml b/certService/pom.xml index b3b83deb..8402d749 100644 --- a/certService/pom.xml +++ b/certService/pom.xml @@ -38,6 +38,7 @@ <spring-boot-starter-actuator.version>2.2.4.RELEASE</spring-boot-starter-actuator.version> <spring-boot-starter-log4j2.version>2.1.5.RELEASE</spring-boot-starter-log4j2.version> <springdoc-openapi-ui.version>1.2.21</springdoc-openapi-ui.version> + <docker-maven-plugin.version>0.33.0</docker-maven-plugin.version> </properties> <dependencyManagement> @@ -144,6 +145,7 @@ <quiet>true</quiet> <verbose>false</verbose> <useStandardDocletOptions>false</useStandardDocletOptions> + <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable> </configuration> <executions> <execution> @@ -164,4 +166,58 @@ </plugins> </build> + <profiles> + <profile> + <id>docker</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>${docker-maven-plugin.version}</version> + <executions> + <execution> + <id>start</id> + <phase>pre-integration-test</phase> + <goals> + <goal>build</goal> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + <configuration> + <images> + <image> + <name>cert-service</name> + <build> + <dockerFile>${project.basedir}/Dockerfile</dockerFile > + </build> + <run> + <ports> + <port>8080:8080</port> + </ports> + <wait> + <!-- Check for this URL to return a 200 return code .... --> + <url>http://localhost:8080/actuator/health</url> + <time>120000</time> + </wait> + </run> + </image> + </images> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> |