diff --git a/Makefile b/Makefile index 02e5efbf8..9a2392411 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ CONSOLE_UI_NEXTAUTH_SECRET ?= $(shell openssl rand -base64 32) # Without this export, UI and API images could not be pulled from registry during the deployment of Console instance export QUARKUS_CONTAINER_IMAGE_TAG=${VERSION} export QUARKUS_KUBERNETES_VERSION=${VERSION} +export QUARKUS_DOCKER_BUILDX_PLATFORM=${PLATFORMS} container-image-api: mvn package -am -pl api -Pcontainer-image -DskipTests -Dquarkus.container-image.image=$(CONSOLE_API_IMAGE) diff --git a/operator/bin/modify-bundle-metadata.sh b/operator/bin/modify-bundle-metadata.sh index 0ee806f1e..b74147372 100755 --- a/operator/bin/modify-bundle-metadata.sh +++ b/operator/bin/modify-bundle-metadata.sh @@ -16,6 +16,7 @@ for ARGUMENT in "$@" ; do VERSION) VERSION=${VALUE};; SKIP_RANGE) SKIP_RANGE=${VALUE};; SKOPEO_TRANSPORT) SKOPEO_TRANSPORT=${VALUE};; + PLATFORMS) PLATFORMS=${VALUE};; *) esac done @@ -111,10 +112,11 @@ ${YQ} eval -o yaml -i '.spec.relatedImages += [{ "image": "'${ui_image_with_digest}'" }]' "${CSV_FILE_PATH}" -${YQ} eval -o yaml -i ".metadata.labels[\"operatorframework.io/arch.amd64\"] = \"supported\"" "${CSV_FILE_PATH}" -${YQ} eval -o yaml -i ".metadata.labels[\"operatorframework.io/arch.arm64\"] = \"supported\"" "${CSV_FILE_PATH}" -${YQ} eval -o yaml -i ".metadata.labels[\"operatorframework.io/arch.ppc64le\"] = \"supported\"" "${CSV_FILE_PATH}" -${YQ} eval -o yaml -i ".metadata.labels[\"operatorframework.io/arch.s390x\"] = \"supported\"" "${CSV_FILE_PATH}" +for full_arch in ${PLATFORMS//,/ } ; do + os_arch=($(echo ${full_arch} | tr '/' '\n')) + arch=${os_arch[1]} + ${YQ} eval -o yaml -i ".metadata.labels[\"operatorframework.io/arch.${arch}\"] = \"supported\"" "${CSV_FILE_PATH}" +done # Add skipRange if present if [[ -n "$SKIP_RANGE" ]]; then