This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/scripts/app_sre_build_deploy.sh

26 lines
538 B
Bash
Raw Normal View History

#!/bin/bash
# AppSRE team CD
set -exv
CURRENT_DIR=$(dirname $0)
BASE_IMG="quay"
QUAY_IMAGE="quay.io/app-sre/${BASE_IMG}"
IMG="${BASE_IMG}:latest"
GIT_HASH=`git rev-parse --short=7 HEAD`
# build the image
BUILD_CMD="docker build" IMG="$IMG" make app-sre-docker-build
# push the image
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-daemon:${IMG}" \
"docker://${QUAY_IMAGE}:latest"
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-daemon:${IMG}" \
"docker://${QUAY_IMAGE}:${GIT_HASH}"