summaryrefslogtreecommitdiffstats
path: root/datafile-app-server
diff options
context:
space:
mode:
authorRehanRaza <muhammad.rehan.raza@est.tech>2019-03-07 15:42:51 +0000
committerRehanRaza <muhammad.rehan.raza@est.tech>2019-03-07 15:42:51 +0000
commitc6c15cad13e0869cbb2e83c1dda98d31c3104907 (patch)
tree9c1ba9340448fd4f4b4afd2f030dd6c138f02cc2 /datafile-app-server
parent62d36a3601832fdabc4946dfd5038904b8da0e94 (diff)
Change to docker-maven-plugin
Change-Id: I5dc3c5b69b2ef764992e2db76eb9cc154ff5adf7 Issue-ID: DCAEGEN2-1269 Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
Diffstat (limited to 'datafile-app-server')
-rw-r--r--datafile-app-server/pom.xml46
-rw-r--r--datafile-app-server/src/main/docker/Dockerfile (renamed from datafile-app-server/src/main/resources/Dockerfile)0
2 files changed, 26 insertions, 20 deletions
diff --git a/datafile-app-server/pom.xml b/datafile-app-server/pom.xml
index e5b87eb7..ace0389c 100644
--- a/datafile-app-server/pom.xml
+++ b/datafile-app-server/pom.xml
@@ -32,7 +32,6 @@
<packaging>jar</packaging>
<properties>
- <dockerfile.maven.version>1.4.10</dockerfile.maven.version>
<docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
</properties>
@@ -55,21 +54,27 @@
</plugin>
<plugin>
<groupId>com.spotify</groupId>
- <artifactId>dockerfile-maven-plugin</artifactId>
- <version>${dockerfile.maven.version}</version>
+ <artifactId>docker-maven-plugin</artifactId>
<configuration>
- <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
- <tag>latest</tag>
- <dockerfile>${project.build.outputDirectory}/Dockerfile</dockerfile>
+ <serverId>${onap.nexus.dockerregistry.daily}</serverId>
+ <imageName>${docker.image.name}</imageName>
+ <imageTags>
+ <tag>latest</tag>
+ </imageTags>
+ <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}</directory>
+ <include>${project.artifactId}.jar</include>
+ <targetPath>/target</targetPath>
+ </resource>
+ <resource>
+ <targetPath>/config</targetPath>
+ <directory>${project.basedir}/config</directory>
+ <include>*</include>
+ </resource>
+ </resources>
</configuration>
- <dependencies>
- <dependency>
- <groupId>com.spotify</groupId>
- <artifactId>docker-client</artifactId>
- <classifier>shaded</classifier>
- <version>8.10.0</version>
- </dependency>
- </dependencies>
<executions>
<execution>
<id>build-image</id>
@@ -83,10 +88,11 @@
<phase>deploy</phase>
<goals>
<goal>tag</goal>
- <goal>push</goal>
</goals>
<configuration>
- <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
+ <image>${docker.image.name}:latest</image>
+ <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
+ <pushImage>true</pushImage>
</configuration>
</execution>
<execution>
@@ -94,11 +100,11 @@
<phase>deploy</phase>
<goals>
<goal>tag</goal>
- <goal>push</goal>
</goals>
<configuration>
- <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
+ <image>${docker.image.name}:latest</image>
<newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
+ <pushImage>true</pushImage>
</configuration>
</execution>
<execution>
@@ -106,11 +112,11 @@
<phase>deploy</phase>
<goals>
<goal>tag</goal>
- <goal>push</goal>
</goals>
<configuration>
- <image>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</image>
+ <image>${docker.image.name}:latest</image>
<newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
+ <pushImage>true</pushImage>
</configuration>
</execution>
</executions>
diff --git a/datafile-app-server/src/main/resources/Dockerfile b/datafile-app-server/src/main/docker/Dockerfile
index 6ab30cc2..6ab30cc2 100644
--- a/datafile-app-server/src/main/resources/Dockerfile
+++ b/datafile-app-server/src/main/docker/Dockerfile