Commit 6e6a7ca3 authored by Mikhail Bulynin's avatar Mikhail Bulynin
Browse files

Update .gitlab-ci.yml file

1 merge request!7merge backend
Pipeline #1189 canceled with stage
Showing with 4 additions and 11 deletions
+4 -11
......@@ -16,18 +16,11 @@ docker-build:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
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 --pull -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}"
- docker build --pull -t "wallex-back${CI_COMMIT_SHORT_SHA}" ./backend
- docker push "wallex-back${CI_COMMIT_SHORT_SHA}"
rules:
- if: $CI_COMMIT_BRANCH
exists:
- wallexapp/Dockerfile
- backend/Dockerfile
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment