Skip to content

Commit

Permalink
chore: include CIRCLE_TAG in the cache key
Browse files Browse the repository at this point in the history
to avoid deploy steps potentially picking up a previous merge build
that wrote to the cache out of order
  • Loading branch information
pjenvey committed Aug 2, 2018
1 parent d0fdc3a commit d85cee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit d85cee7

Please sign in to comment.