summaryrefslogtreecommitdiffstats
path: root/installation/dgbuilder/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'installation/dgbuilder/pom.xml')
-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>