Fix xacml-pdp latest tag
Eliminating the patch - using Rashmi's changes.
Issue-ID: POLICY-1737
Change-Id: Iaacd198aeca5daef71e4356f7446e23b9c65d9ce
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Signed-off-by: pdragosh <pdragosh@research.att.com>
diff --git a/packages/policy-xacmlpdp-docker/pom.xml b/packages/policy-xacmlpdp-docker/pom.xml
index ef47dd7..63e02f7 100644
--- a/packages/policy-xacmlpdp-docker/pom.xml
+++ b/packages/policy-xacmlpdp-docker/pom.xml
@@ -62,18 +62,18 @@
<configuration>
<source>
println 'Project version: ' + project.properties['pdpx.project.version'];
- def versionArray;
- if ( project.properties['pdpx.project.version'] != null ) {
- versionArray = project.properties['pdpx.project.version'].split('-');
+ if (project.properties['pdpx.project.version'] != null) {
+ def versionArray = project.properties['pdpx.project.version'].split('-')
+ def minMaxVersionArray = versionArray[0].tokenize('.')
+ if (project.properties['pdpx.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['pdpx.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>