From f00a681cc1dfd2f6b638eb8d7a03c5b82a5d5b90 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 19 Jun 2024 23:45:42 -0400 Subject: [PATCH] Change CI caching strategy Key the cache on the image being used and the commit sha. This should allow the cache to be reused by the same runner across multiple jobs/stages where appropriate. --- .gitlab-ci.yml | 4 +--- changelog.d/ci-cache.skip | 0 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 changelog.d/ci-cache.skip diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da2ddcf42..2fa519291 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,9 +18,7 @@ workflow: - if: $CI_COMMIT_BRANCH cache: &global_cache_policy - key: - files: - - mix.lock + key: $CI_JOB_IMAGE-$CI_COMMIT_SHORT_SHA paths: - deps - _build diff --git a/changelog.d/ci-cache.skip b/changelog.d/ci-cache.skip new file mode 100644 index 000000000..e69de29bb