feat(build): support for multi arch container image (#233)

* support for multi arch container image via github actions
* suffix amd64 arch tag in zfs driver image

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
This commit is contained in:
Prateek Pandey 2020-11-11 14:16:33 +05:30 committed by GitHub
parent 64bc7cb1c9
commit e52d6c7067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 389 additions and 29 deletions

View file

@ -22,7 +22,33 @@ then
exit 1
fi
function pushBuildx() {
BUILD_TAG="latest"
TARGET_IMG=${DIMAGE}
# TODO Currently ci builds with commit tag will not be generated,
# since buildx does not support multiple repo
# if not a release build set the tag and ci image
if [ -z "${RELEASE_TAG}" ]; then
return
# BUILD_ID=$(git describe --tags --always)
# BUILD_TAG="${BRANCH}-${BUILD_ID}"
# TARGET_IMG="${DIMAGE}-ci"
fi
echo "Tagging and pushing ${DIMAGE}:${TAG} as ${TARGET_IMG}:${BUILD_TAG}"
docker buildx imagetools create "${DIMAGE}:${TAG}" -t "${TARGET_IMG}:${BUILD_TAG}"
}
# if the push is for a buildx build
if [[ ${BUILDX} ]]; then
pushBuildx
exit 0
fi
IMAGEID=$( sudo docker images -q ${DIMAGE}:ci )
DIMAGE="${DIMAGE}-${XC_ARCH}"
echo "${DIMAGE}:ci -> $IMAGEID"
if [ -z ${IMAGEID} ];
then