Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only save CircleCI source cache once a day #19958

Merged
merged 1 commit into from
Jan 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@ jobs:
resource_class: xlarge

steps:
- run:
name: Create source cache key
command: "date +%D > /home/circleci/today.date"

# cache source
- restore_cache:
key: code-dot-org-source-v6-{{ .Branch }}-{{ .Revision }}
keys:
- code-dot-org-source-v6-{{ .Branch }}-
- code-dot-org-source-v6-
- code-dot-org-source-v7-{{ checksum "/home/circleci/today.date" }}
- code-dot-org-source-v7-

- checkout
- run:
name: merge staging
command: bin/circle/merge-base

- save_cache:
key: code-dot-org-source-v7-{{ checksum "/home/circleci/today.date" }}
paths:
- ".git"

- run:
name: setup tests/artifacts dirs
command: |
Expand All @@ -48,11 +57,6 @@ jobs:
sudo apt-get install -y libicu-dev enscript moreutils pdftk libmysqlclient-dev libsqlite3-dev
sudo mv /usr/bin/gnu_parallel /usr/bin/parallel

- save_cache:
key: code-dot-org-source-v6-{{ .Branch }}-{{ .Revision }}
paths:
- ".git"

# restore gems cache
- restore_cache:
key: code-dot-org-bundle-v6-{{ checksum "Gemfile.lock" }}
Expand Down