summaryrefslogtreecommitdiffstats
path: root/packages/policy-pap-docker
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-06-11 12:51:35 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-11 12:51:35 +0000
commitfde702471743115e7492951873dd48ba3dbc66bb (patch)
treed72b04334096a4e3390b997812d8f08d3640db4a /packages/policy-pap-docker
parentde6a7d44138a968b798eab678f20885e7d48ebc9 (diff)
parent99dadce1f0f15a22f26bf9d9c3c09f25a5972f4a (diff)
Merge "policy/pap must publish docker images with tag X.Y-SNAPSHOT-latest"
Diffstat (limited to 'packages/policy-pap-docker')
-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>