From 309e6b9d8ab082a37adb07334be4dfb781bf8cfa Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Mon, 13 Apr 2020 09:56:50 -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 ebf243a4..3acf7a37 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,7 @@ jobs: name: docker save app:buildcpy command: docker save -o /cache/dockercpy.tar "app:buildcpy" - save_cache: - key: v1-{{ .Branch }}-{{epoch}} + key: v1-{{ .Branch }}-{{ .Environment.CIRCLE_TAG }}-{{ epoch }} paths: - /cache/dockerpypy.tar - /cache/dockercpy.tar @@ -56,7 +56,7 @@ jobs: steps: - setup_remote_docker - restore_cache: - key: v1-{{.Branch}} + key: v1-{{ .Branch }}-{{ .Environment.CIRCLE_TAG }} - run: name: Restore PyPy Docker image cache command: docker load -i /cache/dockerpypy.tar