From d85cee709558b1f80ba4d2cce91ad17b49627acb Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Thu, 2 Aug 2018 11:23:45 -0700 Subject: [PATCH] chore: include CIRCLE_TAG in the cache key to avoid deploy steps potentially picking up a previous merge build that wrote to the cache out of order --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b1adda632..0a47b6eeb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: name: docker save app:build command: mkdir -p /cache; docker save -o /cache/docker.tar "app:build" - save_cache: - key: v1-{{ .Branch }}-{{epoch}} + key: v1-{{ .Branch }}-{{ .Environment.CIRCLE_TAG }}-{{ epoch }} paths: - /cache/docker.tar @@ -50,7 +50,7 @@ jobs: steps: - setup_remote_docker - restore_cache: - key: v1-{{.Branch}} + key: v1-{{ .Branch }}-{{ .Environment.CIRCLE_TAG }} - run: name: Restore Docker image cache command: docker load -i /cache/docker.tar