From c2d12052d5896a1be6e57a6318fdcc39ad4a217a Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 29 Jan 2018 13:47:25 +1100 Subject: [PATCH] Cache our builds based on branches - part 2 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faa62e5..fc4bd21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: variables: BRANCH: plus VERSION: 7.1-fpm-${BRANCH} - CACHETAG: build + CACHETAG: build-${BRANCH} DOCKER_REGISTRY: registry.leenooks.net DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 @@ -35,7 +35,7 @@ build: - 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} - - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}-${BRANCH} + - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} tags: - docker only: