Added app-sre ci pipleline scripts and Makefile targets

Signed-off-by: Tejas Parikh <tparikh@redhat.com>
This commit is contained in:
Tejas Parikh 2019-11-14 10:53:22 -05:00
parent 417f245d04
commit b35986d764
No known key found for this signature in database
GPG key ID: 34A7EFC6CE6A7468
3 changed files with 42 additions and 0 deletions

25
scripts/app_sre_build_deploy.sh Executable file
View file

@ -0,0 +1,25 @@
#!/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}"

8
scripts/app_sre_pr_check.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
set -exv
BASE_IMG="quay"
IMG="${BASE_IMG}:latest"
BUILD_CMD="docker build" IMG="$IMG" make app-sre-docker-build