Skip to content

Commit

Permalink
Testing security-compliace branch lookup (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-williams-rh authored Sep 22, 2023
1 parent e1b47c8 commit 0b8d799
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .rhcicd/build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fi
DOCKER_CONF="$PWD/.docker"
mkdir -p "$DOCKER_CONF"

echo "GIT BRANCH: $GIT_BRANCH"

IMAGE="quay.io/cloudservices/policies-ui-backend"
IMAGE_TAG=$(git rev-parse --short=7 HEAD)
SECURITY_COMPLIANCE_TAG="sc-$(date +%Y%m%d)-$(git rev-parse --short=7 HEAD)"
Expand All @@ -24,7 +26,7 @@ docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOK
docker --config="$DOCKER_CONF" build -t "${IMAGE}:${IMAGE_TAG}" . -f src/main/docker/Dockerfile.jvm
docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG}"

if [[ $GIT_BRANCH == security-compliance ]]; then
if [[ $GIT_BRANCH == *"security-compliance"* ]]; then
docker --config="$DOCKER_CONF" tag "${IMAGE}:${IMAGE_TAG}" "${IMAGE}:${SECURITY_COMPLIANCE_TAG}"
docker --config="$DOCKER_CONF" push "${IMAGE}:${SECURITY_COMPLIANCE_TAG}"
else
Expand Down

0 comments on commit 0b8d799

Please sign in to comment.