Comments (12)
I think the key based approach is the best, it would provide people plenty of flexability. Additionally it keeps it consistent with how multiple paths are defined.
from cache-buildkite-plugin.
At the moment, you can either;
- checksum a single file
- checksum a whole single folder (recursively)
Multiple files like you described in your example will not work that way. But this can be implemented.
from cache-buildkite-plugin.
Hey @lewis785,
I'm doing my own tests on my end. What do you think about the following approaches:
Comma-separated:
node-cache: &node-cache
id: node
key: "v1-cache-{{ id }}-{{ runner.os }}-{{ checksum 'package-lock.json,src/example-1/package-lock.json,src/example-2/package-lock.json' }}"
Glob-pattern:
node-cache: &node-cache
id: node
key: "v1-cache-{{ id }}-{{ runner.os }}-{{ checksum '**/package-lock.json' }}"
P.S.: This may be miss the main /package-lock.json
and only include sub-directories.
Key-based:
node-cache: &node-cache
id: node
key: "v1-cache-{{ id }}-{{ runner.os }}-{{ checksum }}" # if no data given, checksum key below will be used:
checksum: # list of files to get cheksums
- package-lock.json
- **/package-lock.json # and glob pattern! or maybe full list of single files...
It seems Key-based
is looking good and more fit to the structure.
Any ideas?
from cache-buildkite-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cache-buildkite-plugin.
Not stale.
from cache-buildkite-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cache-buildkite-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cache-buildkite-plugin.
Not stale
from cache-buildkite-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cache-buildkite-plugin.
not stale
from cache-buildkite-plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cache-buildkite-plugin.
Not stale
from cache-buildkite-plugin.
Related Issues (20)
- Files restored using restore_keys dont trigger upload at the end HOT 3
- [FEATURE REQUEST] Always upload cache HOT 17
- [FEATURE REQUEST] Ability to run a command before calculating cache key? HOT 6
- Ability to run a command or script prior to cache save HOT 4
- Glob fails `**/node_modules: Warning: Cannot stat: No such file or directory` HOT 4
- [FEATURE REQUEST] Skip command if cache hit found
- epic: Release `v2.5.0` HOT 8
- Question on `rsync` backend HOT 2
- [QUESTION] Can you combine paths on checksum? HOT 3
- eliminate download progress in the log HOT 5
- Readonly option, disable upload HOT 2
- [FEATURE REQUEST] Prevent cache upload (to S3) if cache file/folder is empty/non-existent HOT 2
- Prevent parallel jobs from overwriting the same s3 object when saving the cache HOT 5
- Failed S3 downloads not handled HOT 4
- Don't upload to S3 on local cache hit
- Can't access cached npm or pnpm from next job/step (step label: 'npm or pnpm work?') HOT 1
- Feature request: Have a option to utilize cache in pre-command but not uploading back to s3 in post-command
- [feature] Allow environment variables in bucket name
- cache plugin fails when previously saved file is corrupted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache-buildkite-plugin.