From 4da9d4476fe968d3b915f7ca28b22bb322899614 Mon Sep 17 00:00:00 2001 From: Paul Vaduva Date: Thu, 27 Jun 2019 18:00:57 +0200 Subject: Multiplatform support for policy Add multiplatfrom support for policy-base and policy-common docker images: - the pom.xml files are modified to push and pull from dockerhub instead of nexus repository (as nexus lacks support for manifest list) - for each image that is built with maven, an arch suffix is added to the tag. The currently supported architectures are amd64 and arm64. - the creation of the timestamped tag is moved from the pom.xml files to the docker_push_manifest.sh script - for each image built via the Jenkins CI jobs, the docker_push_manifest.sh is called. The script pushes a manifest list for each tag, plus it creates the timestamp tags for SNAPSHOT or STAGING images, depending on what job called the script (merge job, or stag job) For using the images, the name of the manifest list is to be used (which is the same as the current images in nexus) Issue-ID: POLICY-1997 Change-Id: If54e7ee6ac432a999844d3584e146a90e2247323 Signed-off-by: Paul Vaduva Signed-off-by: Cristina Pauna Signed-off-by: Alexandru Avadanii --- policy-base/alpine/pom.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'policy-base/alpine') diff --git a/policy-base/alpine/pom.xml b/policy-base/alpine/pom.xml index 028cf466..d58a7772 100644 --- a/policy-base/alpine/pom.xml +++ b/policy-base/alpine/pom.xml @@ -26,7 +26,7 @@ org.onap.policy.docker policy-base - 1.5.0-SNAPSHOT + 2.0.0-SNAPSHOT pom @@ -43,7 +43,7 @@ 1.0 - validate + pre-clean execute @@ -62,6 +62,12 @@ } println 'New tag for docker: ' + project.properties['project.docker.latesttag.version']; + if ( "aarch64".equals(System.properties['os.arch']) ) { + project.properties['project.docker.arch'] = "arm64"; + } else { + project.properties['project.docker.arch'] = System.properties['os.arch']; + } + println 'Using arch for docker: ' + project.properties['project.docker.arch']; @@ -79,14 +85,13 @@ - onap/policy-base-alpine + onap/policy-base-alpine:latest-${project.docker.arch} try Dockerfile - ${project.version} - ${project.version}-${maven.build.timestamp} - ${project.docker.latesttag.version} + ${project.version}-${project.docker.arch} + ${project.docker.latesttag.version}-${project.docker.arch} -- cgit 1.2.3-korg