Skip to content

Commit

Permalink
CIRCLECI: push containers with latest tag when build master git branch
Browse files Browse the repository at this point in the history
When using master branch, the quay.io images are reference as master.
The operator team wants to have the name as latest, so all components
can have the same naming.

FIX https://issues.redhat.com/browse/THREESCALE-7251

Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
  • Loading branch information
eloycoto committed Jul 19, 2021
1 parent 9c92992 commit 7d575e3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ jobs:
- run: make test-runtime-image gateway-logs --keep-going
- login-docker:
command: |
IMAGE_NAME="apicast:${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
if [ "${IMAGE_TAG}" == "master" ]
then
IMAGE_TAG="latest"
fi
IMAGE_NAME="apicast:${IMAGE_TAG}"
docker tag apicast-runtime-image ${IMAGE_NAME}
make push
- cleanup-docker
Expand Down Expand Up @@ -174,7 +179,12 @@ jobs:
- login-docker:
command: |
IMAGE_NAME="apicast:${CIRCLE_TAG:-${CIRCLE_BRANCH}}-builder"
IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
if [ "${IMAGE_TAG}" == "master-builder" ]
then
IMAGE_TAG="latest-builder"
fi
IMAGE_NAME="apicast:${IMAGE_TAG}"
docker tag apicast-builder-image ${IMAGE_NAME}
make push
Expand Down

0 comments on commit 7d575e3

Please sign in to comment.