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