From 35dc4aa07a7286ee3cae5f3481134700c22ee10c Mon Sep 17 00:00:00 2001 From: Samir Patel <48686912+54mir@users.noreply.github.com> Date: Wed, 20 Oct 2021 13:47:29 -0500 Subject: [PATCH] same2 --- .gitlab/.gitlab-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index e1b4d9048..23d1ef7a5 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -4,7 +4,7 @@ include: - template: Security/Dependency-Scanning.gitlab-ci.yml variables: - GO_VERSION: 1.16.3 + GOVERSION: 1.16.3 stages: - test @@ -133,16 +133,9 @@ build container fb: services: - docker:dind script: - - | - if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then - tag="" - echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'" - else - tag=":$CI_COMMIT_REF_SLUG" - echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" - fi - - docker build --build-arg GO_VERSION=$GO_VERSION -t "$CI_REGISTRY_IMAGE${tag}" . - - docker push "$CI_REGISTRY_IMAGE${tag}" - - echo 'Created docker image featurebase:test' + - tag = "'$CI_REGISTRY_IMAGE':'$CI_COMMIT_SHORT_SHA'" + - docker build --build-arg GO_VERSION=$GOVERSION -t "$tag" . + - docker push "$tag" + - echo "Created docker featurebase image with tag '$tag'"