summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2019-06-07 15:53:59 -0400
committerRashmi Pujar <rashmi.pujar@bell.ca>2019-06-07 15:54:24 -0400
commit99dadce1f0f15a22f26bf9d9c3c09f25a5972f4a (patch)
treef8bef7033e3f919825dda938d8e89b032e3d0318
parent9f41ede37c78dd5dcea1851e114b7bdf9a5df7a5 (diff)
policy/pap 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: I372de55eca0208df4bb059221ceae76d05737a10
-rw-r--r--packages/policy-pap-docker/pom.xml34
1 files changed, 14 insertions, 20 deletions
diff --git a/packages/policy-pap-docker/pom.xml b/packages/policy-pap-docker/pom.xml
index e839b63e..4aecace4 100644
--- a/packages/policy-pap-docker/pom.xml
+++ b/packages/policy-pap-docker/pom.xml
@@ -60,25 +60,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>
@@ -105,7 +99,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>
@@ -178,4 +172,4 @@
<type>tar.gz</type>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>