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
Tejas Parikh b35986d764
Added app-sre ci pipleline scripts and Makefile targets
Signed-off-by: Tejas Parikh <tparikh@redhat.com>
2019-11-14 10:53:22 -05:00

25 lines
538 B
Bash
Executable file

#!/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}"