Skip to content

Commit

Permalink
Update Build-Deploy Script (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-williams-rh authored and ddonahue007 committed Sep 5, 2023
1 parent e6aea19 commit f452bf7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -exv
IMAGE_NAME="quay.io/cloudservices/yuptoo"
IMAGE_TAG=$(git rev-parse --short=7 HEAD)
ADDITIONAL_TAGS="qa latest"
SECURITY_COMPLIANCE_TAG="sc-$(date +%Y%m%d)"

if [[ -z "$QUAY_USER" || -z "$QUAY_TOKEN" ]]; then
echo "QUAY_USER and QUAY_TOKEN must be set"
Expand All @@ -25,8 +26,8 @@ docker --config="$DOCKER_CONF" push "${IMAGE_NAME}:${IMAGE_TAG}"


if [[ $GIT_BRANCH == *"security-compliance"* ]]; then
docker --config="$DOCKER_CONF" tag "${IMAGE_NAME}:${IMAGE_TAG}" "${IMAGE_NAME}:security-compliance"
docker --config="$DOCKER_CONF" push "${IMAGE_NAME}:security-compliance"
docker --config="$DOCKER_CONF" tag "${IMAGE_NAME}:${IMAGE_TAG}" "${IMAGE_NAME}:${SECURITY_COMPLIANCE_TAG}"
docker --config="$DOCKER_CONF" push "${IMAGE_NAME}:${SECURITY_COMPLIANCE_TAG}"
else
for ADDITIONAL_TAG in $ADDITIONAL_TAGS; do
docker --config="$DOCKER_CONF" tag "${IMAGE_NAME}:${IMAGE_TAG}" "${IMAGE_NAME}:${ADDITIONAL_TAG}"
Expand Down

0 comments on commit f452bf7

Please sign in to comment.