git-lfs and build cache
Hi,
I am finding that appveyor is burning through my git-lfs bandwidth quota pretty quickly, as each build is on a clean VM every build is pulling down the same files again and again.
My initial thought was to use the appveyor build cache to preserve .git/lfs/objects folder between builds.
Unfortunately the build cache is restored after the repository is cloned so this doesn't help me.
Is there a way to somehow cache git-lfs data between builds?
Maybe if there is a way to interact with the build cache programmatically I could set something up on the init event.
Or if there was a way to have the build cache restore run before the repository is cloned.
Many Thanks
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 17 Mar, 2017 02:35 AM
Hi Steven,
What you can do is to clone you repo manually at
install
stage, and to prevent AppVeyor from cloning before cache restored, so something no-op likeecho skip clone
asclone_script
.Let us know if this helps.
Thanks!
Ilya.
2 Posted by sdawkins on 20 Mar, 2017 02:40 PM
awesome, thanks very much.
doing a manual clone in the install stage worked perfectly.
the only problem I have is I don't know when to invalidate the build cache but I am happy to clear this manually for this project.
below are the pertinent pieces of my appveyor.yml for future reference to anyone attempting the same sort of thing.
bits and pieces taken from: https://www.appveyor.com/docs/how-to/git-push/
Many Thanks
Steve
Support Staff 3 Posted by Feodor Fitsner on 20 Mar, 2017 03:26 PM
Cool, thanks for the update!
You can use "cache dependency" to invalidate the cache: https://www.appveyor.com/docs/build-cache/#addchange-dependency
4 Posted by trevor.sandy on 05 Oct, 2017 09:14 PM
Nothing wrong with the solution above but there are some superfluous commands.
Unless you expect the push content back to your git repo, there's no need to create git-credentials and its associated secure content. The benefit of a lighter approach being if your repo is cloned by a 3rd party, they won't have to update the yml with new credentials etc...
If your use case is to preserve .git\lfs\objects - or any other content in the 'clone_folder', this can be done in the following manner - which most closely resembles the skipped AppVeyor default cloning behavior:
Cheers,
5 Posted by sdawkins on 05 Oct, 2017 09:14 PM
I am out of the office on annual leave until Monday the 9th of October
For support on any IT-related matter please contact [email blocked]
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:20 AM.