From a816909e3708bc01d9f9dde819e9c67f02ad7f59 Mon Sep 17 00:00:00 2001 From: Fried Hoeben Date: Mon, 18 Dec 2023 10:16:22 +0100 Subject: [PATCH] first step to create manifests --- .circleci/config.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index fa2b0ac971..4b5748e5e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -141,6 +141,49 @@ jobs: ARCH=$(echo << parameters.platforms >> | sed 's/linux\///') USE_RANDOM_USER_ID=${USE_RANDOM_USER} NAMESPACE=${NAMESPACE} VERSION=${BRANCH}_${ARCH} BUILD_DATE=${BUILD_DATE} SKIP_BUILD=true make test_${ARCH} + manifest-multi-arch: + parameters: + image-name: + type: string + machine-type: + type: executor + executor: << parameters.machine-type >> + environment: + NAMESPACE: seleniarm + BUILD_DATE: today + steps: + - checkout + - restore_cache: + keys: + - multi-arch-images-{{ .Branch }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}-linux/arm64 + - restore_cache: + keys: + - multi-arch-images-{{ .Branch }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}-linux/amd64 + - run: uname -a + - run: docker info + - run: + name: "Load built images from cache into Docker" + command: | + echo "CIRCLE_WORKFLOW_ID = " $CIRCLE_WORKFLOW_ID + docker load -i images/arm64.tar + docker load -i images/amd64.tar + - run: + name: "Create manifest" + command: | + export VERSION=${CIRCLE_BRANCH//\//-} + export IMAGE_NAME=$NAMESPACE/<< parameters.image-name >> + export MANIFEST_TAG=${VERSION}-${BUILD_DATE} + export ARM_TAG=${VERSION}_arm64-${BUILD_DATE} + export AMD_TAG=${VERSION}_amd64-${BUILD_DATE} + docker manifest create ${IMAGE_NAME}:${MANIFEST_TAG} ${IMAGE_NAME}:${ARM_TAG} ${IMAGE_NAME}:${AMD_TAG} + - run: + name: "Inspect manifest" + command: | + export VERSION=${CIRCLE_BRANCH//\//-} + export IMAGE_NAME=$NAMESPACE/<< parameters.image-name >> + export MANIFEST_TAG=${VERSION}-${BUILD_DATE} + docker manifest inspect ${IMAGE_NAME}:${MANIFEST_TAG} + deploy-multi-arch: parameters: platforms: @@ -365,6 +408,11 @@ workflows: requires: [build-multi-arch-amd64] platforms: linux/amd64 machine-type: ubuntu2204amd64 + - manifest-multi-arch: + name: manifest-multi-arch-chromium + requires: [test-multi-arch-arm64, test-multi-arch-amd64] + image-name: chromium + machine-type: ubuntu2204amd64 deploy-multi-arch-full-grid: jobs: