X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ffoundation%2Fscripts%2Fcni%2Fovn-kubernetes%2Fpush-manifest.sh;fp=src%2Ffoundation%2Fscripts%2Fcni%2Fovn-kubernetes%2Fpush-manifest.sh;h=f4e3c803199d0786f2dd6cacc7f277bcc6371eba;hb=a4546182269b01038a1e672cb16b081930bd11bb;hp=0000000000000000000000000000000000000000;hpb=59b4dc71733209d00625e0ed2f342417fd09d998;p=iec.git diff --git a/src/foundation/scripts/cni/ovn-kubernetes/push-manifest.sh b/src/foundation/scripts/cni/ovn-kubernetes/push-manifest.sh new file mode 100755 index 0000000..f4e3c80 --- /dev/null +++ b/src/foundation/scripts/cni/ovn-kubernetes/push-manifest.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +#Supported platforms of multi-arch images are: amd64 arm64 +LINUX_ARCH=(amd64 arm64) +PLATFORMS=linux/${LINUX_ARCH[0]} +for i in $(seq 1 $[${#LINUX_ARCH[@]}-1]) +do + PLATFORMS=$PLATFORMS,linux/${LINUX_ARCH[$i]} +done + +IMAGES_OVN=("ovn-daemonset") +#IMAGES_OVN=("ovn-daemonset" "ovn-daemonset-u") +BRANCH_TAG=latest + +#Before push, 'docker login' is needed +push_multi_arch(){ + + if [ ! -f "./manifest-tool" ] + then + sudo apt-get install -y jq + wget https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-${BUILDARCH} \ + -O manifest-tool && \ + chmod +x ./manifest-tool + fi + + for IMAGE in "${IMAGES_OVN[@]}" + do + echo "multi arch image: ""iecedge/${IMAGE}" + ./manifest-tool push from-args --platforms ${PLATFORMS} --template iecedge/${IMAGE}-ARCH:${BRANCH_TAG} \ + --target iecedge/${IMAGE}:${BRANCH_TAG} + done +} + +echo "Push fat manifest for multi-arch images:" +push_multi_arch +