diff options
author | k.kedron <k.kedron@partner.samsung.com> | 2021-04-16 14:38:52 +0200 |
---|---|---|
committer | Krystian Kedron <k.kedron@partner.samsung.com> | 2021-04-22 14:03:48 +0000 |
commit | 2f7a1b8783367c6804c6599569c72ad7d88ab267 (patch) | |
tree | 6c0e143b450238890cd53e07c7a9db26838d286a /datacollector/pom.xml | |
parent | 442e160da964c94f39ce8b5b457cb10e96825386 (diff) |
Configure maven to produce docker images
For:
- datacollector rapp
- sleepingcelldetector rapp
Change-Id: If394448cb49d6ab082b37eeb49142cc5529789b7
Issue-ID: INT-1896
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Diffstat (limited to 'datacollector/pom.xml')
-rw-r--r-- | datacollector/pom.xml | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/datacollector/pom.xml b/datacollector/pom.xml index 141d212..db59334 100644 --- a/datacollector/pom.xml +++ b/datacollector/pom.xml @@ -28,10 +28,6 @@ <version>0.0.1-SNAPSHOT</version> </parent> - <properties> - <docker-image.name.prefix>org.onap.rapp.datacollector</docker-image.name.prefix> - </properties> - <dependencies> <dependency> <groupId>org.springframework.boot</groupId> @@ -90,6 +86,56 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.8</version> + <executions> + <execution> + <phase>package</phase> + <configuration> + <target> + <copy file="target/${project.artifactId}-${project.version}.jar" tofile="./docker/${project.artifactId}-${project.version}.jar"/> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>${docker-maven-plugin.version}</version> + <executions> + <execution> + <id>docker-build-image</id> + <phase>install</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + <configuration> + <skipPush>${skipDockerPush}</skipPush> + <verbose>true</verbose> + <imagePullPolicy>IfNotPresent</imagePullPolicy> + <images> + <image> + <name>${docker-image.namespace}/${docker-image.name.prefix}/${project.artifactId}</name> + <registry>${docker.registry}</registry> + <build> + <dockerFileDir>${project.basedir}/docker</dockerFileDir> + <tags> + <tag>${project.version}-${maven.build.timestamp}Z</tag> + </tags> + </build> + </image> + </images> + </configuration> + </plugin> + <plugin> <groupId>com.github.kongchen</groupId> <artifactId>swagger-maven-plugin</artifactId> <version>${swagger.maven.plugin.version}</version> |