aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker/pom.xml
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-03-27 07:51:22 -0700
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-03-27 07:54:18 -0700
commit8d5a9b0bc0e394d665e74eddac8fbb8500f01ee9 (patch)
tree5e2c938fa66dbe6f48c7b90be3010eb5e5566ce1 /packages/docker/pom.xml
parentaff623df95cfd0f55c0f5cf6447f6eb2d3a6e32a (diff)
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) <sd378r@intl.att.com>
Diffstat (limited to 'packages/docker/pom.xml')
-rw-r--r--packages/docker/pom.xml32
1 files changed, 32 insertions, 0 deletions
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 @@
<!-- If the maven profile "docker" is specified the parameter -Dmso.git.url=<MsoGitRepo> must be provided
i.e: mvn clean install -P docker -Dmso.git.url=https://gerrit.openecomp.org/r-->
<mso.git.url>${env.GIT_NO_PROJECT}</mso.git.url>
+ <mso.project.version>${project.version}</mso.project.version>
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
+ <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['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'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
@@ -111,6 +141,7 @@
<build>
<tags>
<tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
</tags>
<cleanup>try</cleanup>
<dockerFileDir>docker-files</dockerFileDir>
@@ -124,6 +155,7 @@
<build>
<tags>
<tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
</tags>
<cleanup>try</cleanup>
<dockerFileDir>docker-files</dockerFileDir>