From f2801fabdd727fc72a28b056d79787af484424a7 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 3 Jan 2020 10:48:07 +0100 Subject: Add AArch64 publisher for Debian/source This time proper approach involves job dependencies. First we build and publish x86-64 and aarch64 images with architecture name in image tag. Then we create multiarch manifests to create 'master' images. Change-Id: I6b9505dc326636fc6df8798c62c3a5eb1f728a51 --- tools/create-multiarch-images.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 tools/create-multiarch-images.sh (limited to 'tools') diff --git a/tools/create-multiarch-images.sh b/tools/create-multiarch-images.sh new file mode 100755 index 000000000..11e0aa7c3 --- /dev/null +++ b/tools/create-multiarch-images.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# This script takes aarch64 and x86_64 images from our publish jobs and makes +# multiarch containers so users of any of those architectures can pull them. + +TARGET=${NAMESPACE}/${DISTRO}-${TYPE} +TMP=$(mktemp -d) + +for arch in aarch64 x86_64; do + tools/build.py --base ${DISTRO} --type ${TYPE} --base-arch $arch --list-images|sed -e 's/^.* : //g'|sort >${TMP}/images-$arch +done + +comm -12 ${TMP}/images-aarch64 ${TMP}/images-x86_64 >${TMP}/list-of-common-images +comm -13 ${TMP}/images-aarch64 ${TMP}/images-x86_64 >${TMP}/list-of-x86_64-only-images +comm -23 ${TMP}/images-aarch64 ${TMP}/images-x86_64 >${TMP}/list-of-aarch64-only-images + + +for image_name in $(cat ${TMP}/list-of-common-images); do + docker manifest create ${TARGET}-${image_name}:${TAG} ${TARGET}-${image_name}:${TAG}-aarch64 ${TARGET}-${image_name}:${TAG}-x86_64 +done + +for image_name in $(cat ${TMP}/list-of-x86_64-only-images); do + docker manifest create ${TARGET}-${image_name}:${TAG} ${TARGET}-${image_name}:${TAG}-x86_64 +done + +for image_name in $(cat ${TMP}/list-of-aarch64-only-images); do + docker manifest create ${TARGET}-${image_name}:${TAG} ${TARGET}-${image_name}:${TAG}-aarch64 +done + +for image_name in $(cat ${TMP}/list-of-*); do + docker manifest push ${TARGET}-${image_name}:${TAG} +done -- cgit v1.2.3