From 585206106303a1cd659d6850e7483ed964c9a060 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 27 Feb 2018 19:53:56 +1100 Subject: [PATCH] Update .gitlab-ci --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3fc8c22..9503b73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,16 +8,15 @@ variables: BRANCH: mysql VERSION: 7.2-fpm-${BRANCH} CACHETAG: build-${BRANCH} - DOCKER_REGISTRY: registry.leenooks.net - DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375 services: -- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind +- ${CI_REGISTRY}/leenooks/ci-docker:dind before_script: - docker info - docker version -- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} +- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin test: stage: test @@ -32,6 +31,7 @@ test: build: stage: build script: + - if [ -f init ]; then chmod 500 init; fi - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker push ${CI_REGISTRY_IMAGE}:${VERSION}