Skip to content
Snippets Groups Projects
Commit 8419c1de authored by Benjamin Ledel's avatar Benjamin Ledel
Browse files

Update .gitlab-ci.yml file

parent 23a5baec
Branches
No related tags found
No related merge requests found
Pipeline #1563416 failed
......@@ -48,16 +48,19 @@ rights-engine-docker-build:
script:
- |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
tag="latest"
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
elif [[ -n "$CI_COMMIT_TAG" ]]; then
tag="$CI_COMMIT_TAG"
echo "Running on tag '$CI_COMMIT_TAG': tag = $tag"
else
tag=":$CI_COMMIT_REF_SLUG"
tag="$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
# Build Backend Docker Container
- echo "$CI_REGISTRY_IMAGE${tag}/rights-engine"
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}/rights-engine" ./src
- docker push "$CI_REGISTRY_IMAGE${tag}/rights-engine"
- image_name="$CI_REGISTRY_IMAGE:rights-engine-$tag"
- echo "Docker image name: $image_name"
- docker build --pull -t "$image_name" ./src
- docker push "$image_name"
pages:
image: python:3.8-buster
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment