-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: Adding 'save-cache' property for S3 cache #57
Conversation
Hey @ingcsmoreno! Thanks for the PR. I see the point and I think this is a great feature, but I'm bit unsure about naming: As a bonus, thanks for the version bump & release note addition too. A great favor for me. I usually await for few features until a bump but nowadays I just release even single features too. |
Thanks! I agree the property name could be more descriptive, but I don't want it to be too long either. Maybe something like |
...
- plugins:
- gencer/cache#v2.4.13:
id: ruby # or ruby-3.0
backend: s3
key: "v1-cache-{{ id }}-{{ runner.os }}-{{ checksum 'Gemfile.lock' }}"
restore-keys:
- 'v1-cache-{{ id }}-{{ runner.os }}-'
- 'v1-cache-{{ id }}-'
s3:
cache: true # keep the cache between builds/jobs on the same machine
paths:
- 'bundle/vendor'
... I think only one word keep-cache: true # keep the cache between builds/jobs on the same machine
# or
save-cache: true # save the cache on temp folder and keep between builds/jobs on the same machine As soon as we put this information on README it doesn't matter how short or long the key is. |
@gencer |
@ingcsmoreno As you might notice, CI fails on this PR. |
@gencer looks like it's complaining about the cache-buildkite-plugin/plugin.yml Line 29 in 07a1c2b
I executed the lint on master and it also fails with the same issue. Doesn't seem to be related with my changes. IMHO seems to be something related with the linter image code. Could you give me a hand to figure this out? |
@gencer The CICD check is fixed! |
What it does?
It makes the plugin saves the tar file on
/tmp
after downloading it for the first time, and re-uses that file on any further execution.This is to complement the #36 implementation in further executions of builds on the same node, and when the same cache file is used by multiple pipelines.
How can I test it?
I've created a test to check it works.
Also, use this Plugin from this Fork on a pipeline, and enable the property like this:
Issues
Extra Comments
This is not really to fully address #36 but to complement it.