From 6cb669cdb183a1743c4281ae6bdea2109d824f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 13 Feb 2017 20:36:12 +0100 Subject: [PATCH] Added docker auth to docker push job --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1eb457..6809701 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,8 @@ image-2.7: image-latest: stage: release + before_script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY script: - docker build -f Dockerfile . -t $CI_REGISTRY_IMAGE - docker tag $CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG @@ -68,4 +70,4 @@ image-latest: - docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_SLUG only: - master - - triggers + - triggers \ No newline at end of file