From 25ebeae628dfa1d93a4dc59b4354b72810ed0046 Mon Sep 17 00:00:00 2001 From: ian-j-abbott-accenture <79878368+ian-j-abbott-accenture@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:04:14 -0600 Subject: [PATCH] Update build_deploy.sh update build_deploy to publish both amd and arm images --- build_deploy.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 72fd182..0bfc2b4 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -8,7 +8,8 @@ IMAGE_REPO="quay.io" ORG="urbanos" APP="ubi-hive" IMAGE="${IMAGE_REPO}/${ORG}/${APP}" -IMAGE_TAG="$(${SCRIPT_DIR}/get_image_tag.sh)-hadoop-3.3.6" +IMAGE_TAG_DEFAULT="$(${SCRIPT_DIR}/get_image_tag.sh)-hadoop-3.3.6" +IMAGE_TAG_AMD="$(${SCRIPT_DIR}/get_image_tag.sh)-hadoop-3.3.6-amd" echo $(${SCRIPT_DIR}/get_image_tag.sh) echo $IMAGE_TAG export ACCESS_TOKEN=$1 @@ -38,10 +39,13 @@ trap job_cleanup EXIT ERR SIGINT SIGTERM DOCKER_CONF="$TMP_JOB_DIR/.docker" mkdir -p "$DOCKER_CONF" docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io -docker --config="$DOCKER_CONF" build -t "${IMAGE}:${IMAGE_TAG}" ${SCRIPT_DIR} --secret id=ACCESS_TOKEN --progress=plain --no-cache -docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG}" +docker --config="$DOCKER_CONF" build -t "${IMAGE}:${IMAGE_TAG_DEFAULT}" ${SCRIPT_DIR} --secret id=ACCESS_TOKEN --progress=plain --no-cache +docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG_DEFAULT}" -docker --config="$DOCKER_CONF" tag "${IMAGE}:${IMAGE_TAG}" "${IMAGE}:latest" +docker --config="$DOCKER_CONF" build -t "${IMAGE}:${IMAGE_TAG_AMD}" ${SCRIPT_DIR} --secret id=ACCESS_TOKEN --progress=plain --no-cache --platform linux/amd64 +docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG_AMD}" + +docker --config="$DOCKER_CONF" tag "${IMAGE}:${IMAGE_TAG_AMD}" "${IMAGE}:latest" docker --config="$DOCKER_CONF" push "${IMAGE}:latest" docker --config="$DOCKER_CONF" logout