Skip to content

Use cache keyed by build instructions

Patrick Steinhardt requested to merge pks-ci-file-keyed-cache into master

In order to support testing against our own version of Git and become independent of provided container's Git version, we'll modify CI jobs to use the generic "git" target which is currently in-flight, calling it with GIT_VERSION set to the specific version we want to test against. As we currently cannot yet use pre-built Git versions as they're built against a different set of libraries, we'll instead have to build Git ourselves every time, introducing overhead.

Let's prepare for this by improving our caching strategy. While we're currently only caching Ruby Gems, we'll want to extend the cache to the self-built version of Git and eventually also to the self-built version of libgit2. This requires us to bust the cache whenever their respective build instructions change. Luckily, GitLab CI allows us to key the cache by files, which is in our case both the Makefile and also the Ruby Gemfile.

Edited by Patrick Steinhardt

Merge request reports