aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2019-06-07 15:48:40 -0400
committerRashmi Pujar <rashmi.pujar@bell.ca>2019-06-07 15:52:13 -0400
commit11e734977f6e34b05aedde77486703ca04d66414 (patch)
treedac268273f624115a78632b3400694aba50c024a
parentf9ddf668fd363e66e9514385fa6cc071d7f85d42 (diff)
policy/api must publish docker images with tag X.Y-SNAPSHOT-latest
Issue-ID: POLICY-1808 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Iedd6b7ef98524424ac104e18285a10bb76cd29cc
-rw-r--r--packages/policy-api-docker/pom.xml26
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/policy-api-docker/pom.xml b/packages/policy-api-docker/pom.xml
index f0ee9ba4..1a51f4bf 100644
--- a/packages/policy-api-docker/pom.xml
+++ b/packages/policy-api-docker/pom.xml
@@ -61,19 +61,19 @@
</goals>
<configuration>
<source>
- println 'Project version: ' + project.properties['dist.project.version'];
- def versionArray;
- if ( project.properties['dist.project.version'] != null ) {
- versionArray = project.properties['dist.project.version'].split('-');
+ println 'Project version: ' + project.properties['dist.project.version']
+ if (project.properties['dist.project.version'] != null) {
+ def versionArray = project.properties['dist.project.version'].split('-')
+ def minMaxVersionArray = versionArray[0].tokenize('.')
+ if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
+ } else {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
+ }
+ println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
}
-
- if ( project.properties['dist.project.version'].endsWith("-SNAPSHOT") ) {
- project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest";
- } else {
- project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest";
- }
-
- println 'New tag for docker: ' + project.properties['project.docker.latesttag.version'];
</source>
</configuration>
</execution>
@@ -100,7 +100,7 @@
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latest.minmax.tag.version}</tag>
</tags>
<assembly>
<inline>