diff options
author | 2019-05-14 13:42:46 +0530 | |
---|---|---|
committer | 2019-05-14 13:45:12 +0530 | |
commit | ddb39820395d7fcb8a898eff9e08bc725680e3c2 (patch) | |
tree | 5450ae76aaf4e40b5e376055c541157507e77a0a /dcae-analytics/dcae-analytics-tca-web/pom.xml | |
parent | 7791b721b19906d59236167bf92cd221aedd21b0 (diff) |
Updated pom and docker to generate a stable image
Modified files to produce stable image
Issue-ID: DCAEGEN2-1482
Change-Id: I3aeff6dd2fd208e51b9d6d52c6518d004bbecef8
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web/pom.xml')
-rw-r--r-- | dcae-analytics/dcae-analytics-tca-web/pom.xml | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/pom.xml b/dcae-analytics/dcae-analytics-tca-web/pom.xml index a878a0f..f511100 100644 --- a/dcae-analytics/dcae-analytics-tca-web/pom.xml +++ b/dcae-analytics/dcae-analytics-tca-web/pom.xml @@ -3,6 +3,8 @@ ~ ================================================================================ ~ Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. ~ ================================================================================ + ~ Modifications Copyright (C) 2019 IBM + ~ ================================================================================ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at @@ -39,6 +41,7 @@ <properties> <main.basedir>${project.parent.basedir}</main.basedir> + <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name> </properties> <dependencies> @@ -151,25 +154,37 @@ </plugin> <!-- DOCKER PLUGIN --> <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <configuration> - <skipDocker>false</skipDocker> - <imageName>${docker.repository}/onap/${project.groupId}.${project.artifactId}</imageName> - <dockerDirectory>${project.basedir}</dockerDirectory> - <resources> - <resource> - <targetPath>${project.basedir}</targetPath> - <directory>${project.build.directory}</directory> - <include>${project.build.finalName}.jar</include> - </resource> - </resources> - <imageTags> - <imageTag>${project.version}</imageTag> - <imageTag>latest</imageTag> - </imageTags> - </configuration> - </plugin> + <groupId>com.spotify</groupId> + <artifactId>dockerfile-maven-plugin</artifactId> + <version>1.4.3</version> + <configuration> + <contextDirectory>${project.basedir}</contextDirectory> + <repository>${docker.repository}/${docker.image.name}</repository> + <imageTags> + <tag>${project.version}</tag> + <tag>latest</tag> + <tag>${project.version}-${maven.build.timestamp}Z</tag> + </imageTags> + <useMavenSettingsForAuth>true</useMavenSettingsForAuth> + <buildArgs> + <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME> + <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR> + <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR> + <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR> + </buildArgs> + </configuration> + <executions> + <execution> + <id>default</id> + <phase>install</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + + </plugin> </plugins> </build> </project> |