tools: Adjust the build-and-upload-payload.sh script

Now that we've switched the base container image to using Ubuntu instead
of CentOS, we don't need any kind of extra logic to correctly build the
image for different architectures, as Ubuntu is a multi-arch image that
supports all the architectures we're targetting.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-03-06 11:07:33 +01:00
parent cd2aaeda2a
commit 76b4591e2b

View File

@ -18,23 +18,7 @@ pushd ${KATA_DEPLOY_DIR}
IMAGE_TAG="${REGISTRY}:kata-containers-$(git rev-parse HEAD)-$(uname -m)"
echo "Building the image"
case $(uname -m) in
aarch64)
docker build \
--build-arg BASE_IMAGE_NAME=cdocker.io/library/centos \
--build-arg BASE_IMAGE_TAG=7 \
--tag ${IMAGE_TAG} .
;;
s390x)
docker build \
--build-arg BASE_IMAGE_NAME=docker.io/library/clefos \
--build-arg BASE_IMAGE_TAG=7 \
--tag ${IMAGE_TAG} .
;;
*)
docker build --tag ${IMAGE_TAG} .
;;
esac
docker build --tag ${IMAGE_TAG} .
echo "Pushing the image to quay.io"
docker push ${IMAGE_TAG}
@ -44,23 +28,7 @@ if [ -n "${TAG}" ]; then
echo "Building the ${ADDITIONAL_TAG} image"
case $(uname -m) in
aarch64)
docker build \
--build-arg BASE_IMAGE_NAME=docker.io/library/centos \
--build-arg BASE_IMAGE_TAG=7 \
--tag ${ADDITIONAL_TAG} .
;;
s390x)
docker build \
--build-arg BASE_IMAGE_NAME=docker.io/library/clefos \
--build-arg BASE_IMAGE_TAG=7 \
--tag ${ADDITIONAL_TAG} .
;;
*)
docker build --tag ${ADDITIONAL_TAG} .
;;
esac
docker build --tag ${ADDITIONAL_TAG} .
echo "Pushing the image ${ADDITIONAL_TAG} to quay.io"
docker push ${ADDITIONAL_TAG}