1
0
mirror of https://github.com/quay/quay.git synced 2025-04-18 10:44:06 +03:00
quay/scripts/app_sre_post_deploy_rhel7.sh
Marcus Kok facb4b1e5b
scripts: push to ecr backup when building quay.io (PROJQUAY-3273) (#1578)
change order to push to ecr first when deploying - fixes the problem of needing a newer build when deploying quay.io but cannot get it because quay.io itself is down
2022-11-01 15:46:21 -04:00

23 lines
489 B
Bash
Executable File

#!/bin/bash
# AppSRE team CD
set -exv
BASE_IMG="quay-py3"
IMG="${BASE_IMG}:latest"
QUAY_IMAGE="quay.io/app-sre/${BASE_IMG}"
GIT_HASH=`git rev-parse --short=7 HEAD`
# push the image
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-archive:${BASE_IMG}" \
"docker://${QUAY_IMAGE}:latest"
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-archive:${BASE_IMG}" \
"docker://${QUAY_IMAGE}:${GIT_HASH}"
# remove the archived image
rm ${BASE_IMG}