From 25df1c711a51330fbec5335ead4dfc21b34aa702 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sat, 3 Aug 2019 22:49:17 +0300 Subject: [PATCH] Slightly improved configuration for gitlab-ci [skip ci] --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eaf6ee0..2676c20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,7 +82,7 @@ build:production: --pull --target web --build-arg "build_env=prod" - --cache-from "$APP_IMAGE_NAME:latest" + --cache-from "$APP_IMAGE_NAME:$CI_PIPELINE_ID" --cache-from "$WEB_IMAGE_NAME:latest" -t "$WEB_IMAGE_NAME:$CI_PIPELINE_ID" . - > @@ -90,7 +90,7 @@ build:production: --pull --target db --build-arg "build_env=prod" - --cache-from "$APP_IMAGE_NAME:latest" + --cache-from "$APP_IMAGE_NAME:$CI_PIPELINE_ID" --cache-from "$DB_IMAGE_NAME:latest" -t "$DB_IMAGE_NAME:$CI_PIPELINE_ID" . only: @@ -138,6 +138,8 @@ release:tag: cleanup: stage: cleanup + variables: + GIT_STRATEGY: none script: - docker rmi "$APP_IMAGE_NAME:$CI_PIPELINE_ID" "$APP_IMAGE_NAME:$VERSION" "$APP_IMAGE_NAME:latest" || true - docker rmi "$WEB_IMAGE_NAME:$CI_PIPELINE_ID" "$WEB_IMAGE_NAME:$VERSION" "$WEB_IMAGE_NAME:latest" || true