diff options
-rw-r--r-- | packages/policy-pap-docker/pom.xml | 28 |
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> |