1
0
mirror of https://github.com/quay/quay.git synced 2025-04-18 10:44:06 +03:00
quay/scripts/app_sre_build_deploy_rhel7.sh
Syed Ahmed 1a2bb4a4e9
ui: Remove add_analytics script from Dockerfile (PROJQUAY-4582) (#1669)
The new UI will dynamically add the analytics scripts
2022-12-09 13:06:11 -05:00

30 lines
695 B
Bash
Executable File

#!/bin/bash
# AppSRE team CD
set -exv
CURRENT_DIR=$(dirname $0)
BASE_IMG="quay-py3"
IMG="${BASE_IMG}:latest"
BACKUP_BASE_IMG="quayio-py3-backup"
BACKUP_IMAGE="${BACKUP_URL}/${BACKUP_BASE_IMG}"
GIT_HASH=`git rev-parse --short=7 HEAD`
# build the image
BUILD_CMD="docker build" IMG="$IMG" make app-sre-docker-build
# save the image as a tar archive
docker save ${IMG} -o ${BASE_IMG}
# push image to backup repository
skopeo copy --dest-creds "${BACKUP_USER}:${BACKUP_TOKEN}" \
"docker-archive:${BASE_IMG}" \
"docker://${BACKUP_IMAGE}:latest"
skopeo copy --dest-creds "${BACKUP_USER}:${BACKUP_TOKEN}" \
"docker-archive:${BASE_IMG}" \
"docker://${BACKUP_IMAGE}:${GIT_HASH}"