summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2017-09-14 16:00:33 -0400
committerMichael Hwang <mhwang@research.att.com>2017-09-14 16:01:41 -0400
commit3b421cdb1ad42df78f565d445ee75beca61bb722 (patch)
tree1d39d24a467611133c10ccc8394ebcbd6bf7f591 /pom.xml
parent6e20d0f1bb713dbd959bd33960af60097a28ab92 (diff)
Update pom to do Docker ops for build and deploy
Change-Id: I9fc0ec612dd45038bd825f483fafd4c066d6565f Issue-Id: DCAEGEN2-60 Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml35
1 files changed, 34 insertions, 1 deletions
diff --git a/pom.xml b/pom.xml
index 5979817..6196f30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,7 +176,7 @@
<imageTag>${project.version}</imageTag>
</imageTags>
<baseImage>java:8-jre</baseImage>
- <entryPoint>["java", "-jar", "/opt/${project.build.finalName}.jar", "prod", "/opt/config.yml"]</entryPoint>
+ <entryPoint>["java", "-jar", "/opt/${project.build.finalName}.jar", "prod", "http://consul:8500/v1/kv/service-change-handler?raw=true"]</entryPoint>
<!-- copy the service's jar file from target into the root directory of the image -->
<resources>
<resource>
@@ -186,6 +186,39 @@
</resource>
</resources>
</configuration>
+ <executions>
+ <execution>
+ <id>build-image</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>tag-image-timestamped-version</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>tag</goal>
+ </goals>
+ <configuration>
+ <image>${project.artifactId}</image>
+ <newName>${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId}:${project.version}-${maven.build.timestamp}</newName>
+ <pushImage>true</pushImage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>tag-image-latest-version</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>tag</goal>
+ </goals>
+ <configuration>
+ <image>${project.artifactId}</image>
+ <newName>${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId}:LATEST</newName>
+ <pushImage>true</pushImage>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>