From f3c8a2182f49c0db7a0a7570882f17bb3669d461 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 27 Jun 2018 10:43:41 -0300 Subject: [PATCH] Fix image build on tags --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07e8adc24471..55c71b9fd7eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -291,16 +291,16 @@ jobs: echo "Build preview Docker image" cp ~/repo/.docker-mongo/Dockerfile . cp ~/repo/.docker-mongo/entrypoint.sh . - docker build -t rocketchat/rocket.chat-preview:$CIRCLE_TAG . - docker push rocketchat/rocket.chat-preview:$CIRCLE_TAG + docker build -t rocketchat/rocket.chat.preview:$CIRCLE_TAG . + docker push rocketchat/rocket.chat.preview:$CIRCLE_TAG - if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if echo "$CIRCLE_TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then docker tag rocketchat/rocket.chat:$CIRCLE_TAG rocketchat/rocket.chat:latest docker push rocketchat/rocket.chat:latest docker tag rocketchat/rocket.chat.preview:$CIRCLE_TAG rocketchat/rocket.chat.preview:latest docker push rocketchat/rocket.chat.preview:latest - else + elif echo "$CIRCLE_TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$' ; then docker tag rocketchat/rocket.chat:$CIRCLE_TAG rocketchat/rocket.chat:release-candidate docker push rocketchat/rocket.chat:release-candidate