Skip to content

Commit

Permalink
Update build_deploy.sh
Browse files Browse the repository at this point in the history
update build_deploy to publish both amd and arm images
  • Loading branch information
ian-j-abbott-accenture authored Dec 5, 2024
1 parent 4d14da6 commit 25ebeae
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 25ebeae

Please sign in to comment.