mirror of
https://github.com/quay/quay.git
synced 2025-04-18 10:44:06 +03:00
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
23 lines
489 B
Bash
Executable File
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} |