Skip to content
Snippets Groups Projects
Commit 88d10b0a authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

Update .gitlab-ci.yml

parent 57d7b284
No related branches found
No related tags found
No related merge requests found
# This file is a template, and might need editing before it works on your project. # default template
# Official docker image. # The docker image will be named after the branch name
image: docker:latest # Feel free to modify this file in your own branch
image: docker:latest
services: services:
- docker:dind - docker:dind
variables:
CI_REGISTRY_IMAGE: "registry-gitlab.pasteur.fr/dsi-tools/docker-images"
before_script:
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" registry-gitlab.pasteur.fr
build: build:
except:
- master
stage: build stage: build
script: script:
- export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-') - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME" .
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY - docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment