diff options
author | RehanRaza <muhammad.rehan.raza@est.tech> | 2019-03-07 15:42:51 +0000 |
---|---|---|
committer | RehanRaza <muhammad.rehan.raza@est.tech> | 2019-03-07 15:42:51 +0000 |
commit | c6c15cad13e0869cbb2e83c1dda98d31c3104907 (patch) | |
tree | 9c1ba9340448fd4f4b4afd2f030dd6c138f02cc2 /datafile-app-server/pom.xml | |
parent | 62d36a3601832fdabc4946dfd5038904b8da0e94 (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/pom.xml')
-rw-r--r-- | datafile-app-server/pom.xml | 46 |
1 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> |