summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasan Selvam <srinivasan.s.n@huawei.com>2020-03-06 12:41:05 +0530
committerSrinivasan Selvam <srinivasan.s.n@huawei.com>2020-03-06 12:49:12 +0530
commitd694f53299ca70b927f9b1383c28f434d141968b (patch)
tree80146951b5dd8d10650397950cfa743a7783f918
parentedcb31492dbc6aab5906c5b00874b5631f5cb8ea (diff)
pom.xml changes
Issue-ID: POLICY-1997 Signed-off-by: Srinivasan Selvam <srinivasan.s.n@huawei.com> Change-Id: I28a1a7378e6ed083376179d81bf7825df7feecf6
-rw-r--r--packages/policy-pap-docker/pom.xml28
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/policy-pap-docker/pom.xml b/packages/policy-pap-docker/pom.xml
index 8ca4cab4..2872cbe2 100644
--- a/packages/policy-pap-docker/pom.xml
+++ b/packages/policy-pap-docker/pom.xml
@@ -61,19 +61,20 @@
</goals>
<configuration>
<source>
- 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']
+ println 'Project version: ' + project.properties['dist.project.version'];
+ def versionArray;
+ if ( project.properties['dist.project.version'] != null ) {
+ versionArray = project.properties['dist.project.version'].split('-');
}
+
+ 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'];
+
println 'The arch is: ' + System.properties['os.arch'];
if ( "aarch64".equals(System.properties['os.arch']) ) {
project.properties['project.docker.arch'] = "arm64";
@@ -104,9 +105,8 @@
<cleanup>try</cleanup>
<dockerFile>Dockerfile</dockerFile>
<tags>
- <tag>${project.version}</tag>
<tag>${project.version}-${project.docker.arch}</tag>
- <tag>${project.docker.latest.minmax.tag.version}-${project.docker.arch}</tag>
+ <tag>${project.docker.latesttag.version}-${project.docker.arch}</tag>
</tags>
<assembly>
<inline>