summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/docker/pom.xml31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml
index 531ffb6..dc0eba6 100644
--- a/packages/docker/pom.xml
+++ b/packages/docker/pom.xml
@@ -22,6 +22,36 @@
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ println 'Project version: ' + project.properties['so.project.version'];
+ def versionArray;
+ if ( project.properties['so.project.version'] != null ) {
+ versionArray = project.properties['so.project.version'].split('-');
+ }
+
+ if ( project.properties['so.project.version'].endsWith("-SNAPSHOT") ) {
+ project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest";
+ } else {
+ project.properties['project.docker.latesttag.version']=versionArray[0] + "-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>
<configuration combine.self="override">
@@ -45,6 +75,7 @@
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
</tags>
<assembly>
<inline>