summaryrefslogtreecommitdiffstats
path: root/rulemgt-standalone
diff options
context:
space:
mode:
Diffstat (limited to 'rulemgt-standalone')
-rw-r--r--rulemgt-standalone/pom.xml36
1 files changed, 35 insertions, 1 deletions
diff --git a/rulemgt-standalone/pom.xml b/rulemgt-standalone/pom.xml
index 58d91e9..e68d6d7 100644
--- a/rulemgt-standalone/pom.xml
+++ b/rulemgt-standalone/pom.xml
@@ -30,6 +30,12 @@
<name>holmes-rulemgt/holmes-rulemgt-standalone</name>
<packaging>pom</packaging>
+ <properties>
+ <holmes.rule.project.version>${project.version}</holmes.rule.project.version>
+ <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format>
+ <build.number>${maven.build.timestamp}</build.number>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -191,6 +197,32 @@
</execution>
</executions>
</plugin>
+ <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['holmes.rule.project.version'];
+ def versionArray;
+ if ( project.properties['holmes.rule.project.version'] != null ) {
+ versionArray = project.properties['holmes.rule.project.version'].split('-');
+ }
+
+ 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>
</plugins>
</build>
@@ -213,7 +245,9 @@
<dockerFileDir>${basedir}/target/version/</dockerFileDir>
<dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
<tags>
- <tag>${project.version}-STAGING-latest</tag>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
</tags>
</build>
</image>