forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bazel doesn't support creating a multi-arch manifest, so we can work around that by using a container tool to add multiple architectures to a single manifest. Signed-off-by: Ryan Hallisey <[email protected]>
- Loading branch information
1 parent
8947efe
commit 2af4a05
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
CONTAINER_BUILD="${CONTAINER_BUILD:-docker}" | ||
image_list="virt-controller virt-handler virt-launcher virt-api virt-operator" | ||
|
||
function get_tag { | ||
local tag | ||
tag=${DOCKER_TAG} | ||
# Strip trailing $arch from the tag | ||
for arch in ${BUILD_ARCH//,/ }; do | ||
tag=${tag%"-$arch"} | ||
done | ||
echo $tag | ||
} | ||
|
||
for image in ${image_list}; do | ||
amend="" | ||
for arch in ${BUILD_ARCH//,/ }; do | ||
tag="$(get_tag)" | ||
amend+=" --amend $DOCKER_PREFIX/$image:$tag-$arch" | ||
done | ||
|
||
cmd="$CONTAINER_BUILD manifest create $DOCKER_PREFIX/$image:$tag-multi-arch $amend" | ||
echo $cmd | ||
$cmd | ||
done |