From 8d5a9b0bc0e394d665e74eddac8fbb8500f01ee9 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Mon, 27 Mar 2017 07:51:22 -0700 Subject: Docker image tags reworked Add a groovy script to the pom of the docker module to generate an additional tag to mso and mso-arquillian images. Change-Id: Ica50c2c7166b4401179de711d8ba3e66c7fa129b Signed-off-by: Determe, Sebastien (sd378r) --- packages/docker/pom.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'packages') diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml index c31a775290..4f1d7dcbb3 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -21,11 +21,41 @@ ${env.GIT_NO_PROJECT} + ${project.version} ${project.artifactId}-${project.version} + + org.codehaus.groovy.maven + gmaven-plugin + + + validate + + execute + + + + println project.properties['mso.project.version']; + def versionArray; + if ( project.properties['mso.project.version'] != null ) { + versionArray = project.properties['mso.project.version'].split('\\.'); + } + + if ( project.properties['mso.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']; + + + + + org.apache.maven.plugins maven-scm-plugin @@ -111,6 +141,7 @@ ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} try docker-files @@ -124,6 +155,7 @@ ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} try docker-files -- cgit 1.2.3-korg