summaryrefslogtreecommitdiffstats
path: root/installation/dgbuilder
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-04-24 16:30:26 -0400
committerDan Timoney <dtimoney@att.com>2017-04-24 16:30:38 -0400
commit8f77351687ce1bb10420c97ce40dd9fb73e6bd06 (patch)
treeaa7d17d9a2626f0a068cde2e5de0ec332d4d6e61 /installation/dgbuilder
parent9e9f964cf18c0dfb9c21b5b655b0612221932070 (diff)
[SDNC-5] Docker tag
Update docker tags to match latest ONAP standards Change-Id: I5db0fa66dabc625f6fe5febdf5511a2d33b48c42 Signed-off-by: Dan Timoney <dtimoney@att.com> Former-commit-id: 3be2dec90f877dbca6c9663410053ae7dd229179
Diffstat (limited to 'installation/dgbuilder')
-rw-r--r--installation/dgbuilder/pom.xml41
1 files changed, 39 insertions, 2 deletions
diff --git a/installation/dgbuilder/pom.xml b/installation/dgbuilder/pom.xml
index f7a6375d..73963bc6 100644
--- a/installation/dgbuilder/pom.xml
+++ b/installation/dgbuilder/pom.xml
@@ -19,6 +19,7 @@
<properties>
<image.name>openecomp/dgbuilder-sdnc-image</image.name>
+ <sdnc.project.version>${project.version}</sdnc.project.version>
</properties>
@@ -27,6 +28,42 @@
<plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ println project.properties['sdnc.project.version'];
+ def versionArray;
+ if ( project.properties['sdnc.project.version'] != null ) {
+ versionArray =
+ project.properties['sdnc.project.version'].split('\\.');
+ }
+
+ if (
+ project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")
+ )
+ {
+ project.properties['project.docker.latesttag.version']=versionArray[0]
+ + '.' + versionArray[1] + "-SNAPSHOT-latest";
+ } else {
+ project.properties['project.docker.latesttag.version']=versionArray[0]
+ + '.' + versionArray[1] + "-STAGING-latest";
+ }
+
+ println 'New Tag for docker:' +
+ project.properties['project.docker.latesttag.version'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.16.5</version>
@@ -41,8 +78,8 @@
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
- <tag>latest</tag>
+ <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
</tags>
</build>
</image>