summaryrefslogtreecommitdiffstats
path: root/rulemgt-standalone/pom.xml
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-12 19:06:12 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-13 10:16:15 +0800
commit7d331f3d27fb8018d3f029609048d3df9a0c75a9 (patch)
treea2b1bcf40d342ee03b6f4c5744f0cc50f2900e1a /rulemgt-standalone/pom.xml
parent077bf54381023f73426eecac4c2347ca2b5acd7e (diff)
Change the Version of Dockers to "Staging"
Change-Id: I40e40689f9bc69498a12f14159683d6498c6e1fc Issue-ID: HOLMES-74 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/pom.xml')
-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>