diff options
Diffstat (limited to 'engine-d-standalone/pom.xml')
-rw-r--r-- | engine-d-standalone/pom.xml | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/engine-d-standalone/pom.xml b/engine-d-standalone/pom.xml index 58dcb79..e256f32 100644 --- a/engine-d-standalone/pom.xml +++ b/engine-d-standalone/pom.xml @@ -30,6 +30,12 @@ <name>holmes-engine/holmes-engine-d-standalone</name> <packaging>pom</packaging> + <properties> + <holmes.engine.project.version>${project.version}</holmes.engine.project.version> + <maven.build.timestamp.format>yyMMdd-HHmmss</maven.build.timestamp.format> + <build.number>${maven.build.timestamp}</build.number> + </properties> + <build> <plugins> <plugin> @@ -189,6 +195,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.engine.project.version']; + def versionArray; + if ( project.properties['holmes.engine.project.version'] != null ) { + versionArray = project.properties['holmes.engine.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> @@ -211,7 +243,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> |