From 446cd49e69708cecbd5ce069d41f17c22b657fa1 Mon Sep 17 00:00:00 2001 From: Taka Cho Date: Tue, 10 Aug 2021 13:38:45 -0400 Subject: use url resource for docker-tag -- docker use groovy url resource from docker repo to identify the tag for docker With this change, the "SNAPSHOT-latest" docker tag will change from "2.3.0-SNAPSHOT-latest" to "2.3-SNAPSHOT-latest" for jdk/jre alpine base image as well as db_migrator docker. Also fix a bug in println groovy script. Issue-ID: POLICY-3378 Change-Id: I72bd15e2535f688629ee5f1a823409d8fe83cdb1 Signed-off-by: Taka Cho --- policy-db-migrator/pom.xml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'policy-db-migrator') diff --git a/policy-db-migrator/pom.xml b/policy-db-migrator/pom.xml index 709f8176..dd3a32c7 100644 --- a/policy-db-migrator/pom.xml +++ b/policy-db-migrator/pom.xml @@ -48,9 +48,9 @@ ${project.artifactId}-${project.version} - org.codehaus.groovy.maven - gmaven-plugin - 1.0 + org.codehaus.gmaven + groovy-maven-plugin + 2.1.1 validate @@ -58,21 +58,7 @@ execute - - 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']; - + https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy @@ -95,7 +81,7 @@ ${project.version} ${project.version}-${maven.build.timestamp} - ${project.docker.latesttag.version} + ${project.docker.latest.minmax.tag.version} -- cgit 1.2.3-korg