Commit 705baa45 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-s/docker-login-before-build' into 'dev'

.gitlab-ci.yml docker login before build

See merge request !342
parents 18901581 6d391c31
Pipeline #48374 failed with stages
in 1 minute and 28 seconds
......@@ -347,8 +347,8 @@ deploy_docker:
- export TYPE=`echo $CI_COMMIT_REF_NAME | awk '{ gsub(/prod-/, "") }{ print $1 }'`
- export SHA=`echo $CI_COMMIT_SHA | awk '{ print substr($0, 0, 8) }'`
- export TAG="vidjil/$TYPE:$CUR_DATE-$SHA"
- docker build --no-cache --build-arg git_branch=$CI_COMMIT_REF_NAME --build-arg build_env=PRODUCTION -t $TAG docker/vidjil-$TYPE
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --no-cache --build-arg git_branch=$CI_COMMIT_REF_NAME --build-arg build_env=PRODUCTION -t $TAG docker/vidjil-$TYPE
- docker push $TAG
- docker tag $TAG "vidjil/$TYPE:latest"
- docker push "vidjil/$TYPE:latest"
......
Markdown is supported
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