Allow to use file checksum as cache key
Provide a way to use project file checksum as a cache key. This will speed up pipeline execution time for many users.
Add ability to specify key to CI YAML:
rspec: cache: key: files: Gemfile # generate checksum based on SHA as the `cache:key` value prefix: add-something
We would internally set
Links / references
Currently Gitlab CI doesn't allow to run scripts or have ability to provide project commit checksum in cache key directive.
I have a java project that uses gradle as a build system. In this project all dependencies are defined in a separate file. I would like to recreate gradle cache only when this file has changed.
Other build systems will also can benefit from this approach if projects will put all dependencies in one file.
Make sure these are completed before closing the issue, with a link to the relevant commit.