Commit graph

16 commits

Author SHA1 Message Date
Daz DeBoer
322805e800
Refactor: use a single .json file to describe all cached artifact bundles (#121)
This is a pure refactor, moving from a separate .cache file per bundle to a single cache-metadata.json file describing all bundles. Instead of storing cache metadata in a separate .cache file per artifact bundle, all of the metadata is now stored in a single `.json` file.

This will make it easier to implement more flexible artifact-caching strategies, such as caching each wrapper zip separately.

* Always include cache protocol version in cache key
* Store all cache metadata in a single JSON file
* Rename cache-metadata file and bump protocol version
* Polish and documentation
2021-11-28 10:19:56 -07:00
Daz DeBoer
996094e8e8
Avoid failing job on any failure in post-action
Failures to store cache entries should not fail the action or the Job.
This fix attempts to catch and log any unexpected errors that occur when
saving cache entries.

Fixes: #119
Fixes: #120
2021-11-15 09:31:56 -07:00
Daz DeBoer
cca55d0890
Fail action execution on unhandled errors
Without this, the error logs contain an "UnhandledPromiseRejectionError"
but the action is reported as succeeding.
2021-09-14 07:48:06 -06:00
Daz DeBoer
6fca6b3929
Add support for read-only caching in v2 2021-08-26 17:25:49 -06:00
Daz DeBoer
5340f6e816
Add cache for project .gradle dir
- For now, this is limited to configuration-cache directory
2021-08-24 12:52:51 -06:00
Daz DeBoer
c211be411e
Use monolithic cache for Gradle User Home
- Do not restore cache when GUH exists
- Include RUNNER_OS in the cache key
- Do not save cache on exact hit
- Only save cache in the final post action
- Log before saving cache
2021-08-24 12:52:51 -06:00
Daz DeBoer
a693ccda4b
Allow use of caches 'read-only'
To avoid evicting useful entries, some pipeline may benefit from using existing
cache entries without writing any changes back to the cache.

Fixes #62
2021-08-22 14:28:34 -06:00
Paul Merlin
4c7d97cca4 Add caching of Gradle build configuration cache 2020-06-15 15:58:20 +02:00
Paul Merlin
95e20daa83 Automatic caching of dependencies
in a best effort manner by default
allowing to specify files to hash for computing the cache key
2020-06-15 13:04:42 +02:00
Paul Merlin
059f2e7791 Rename cache.ts to cache-wrapper.ts 2020-06-14 19:04:18 +02:00
Paul Merlin
1c1db193aa Cache wrapper installation 2020-06-13 16:15:53 +02:00
Paul Merlin
42e2fed267 Cache wrapper dist, step 1 2020-06-13 14:48:54 +02:00
Paul Merlin
6cee865aea Lint 2020-06-13 13:58:25 +02:00
Paul Merlin
a31de8476d Format 2020-06-13 13:44:30 +02:00
Paul Merlin
a188e7cd61 Debug logging 2020-06-13 13:36:11 +02:00
Paul Merlin
e0644c97f9 Split action, step 2 2020-06-13 13:34:07 +02:00