Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-02 10:40:09 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-08 12:12:30 +0300
commit443de603ae81c65ff5e98315d708b8038f27d998 (patch)
treeef8dbdf6a6ef62a07a21ff7f89322e5ca351414c /.gitlab-ci.yml
parentb5a73821fbcefa85f0bdc44af30960693e5f9c0b (diff)
ci: Split up Ruby and dependency caches
We're currently using a single cache for both our build-time dependencies like Git and libgit2, and for our Ruby Gems. Ideally, this cache would also include our Go modules, but adding this in is busting the size limitations. Prepare for introducing a separate Go modules cache by splitting up the Ruby and dependency caches. Like this, each job can include only the caches it really needs, which reduces the time it takes to fetch and decompress the archives. And furthermore, by splitting up the caches, we reduce their respective sizes such that we can then easily introduce another cache for Go modules, only.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml35
1 files changed, 25 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57f880e3f..6e3983ec5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,21 +27,31 @@ include:
- template: Security/Coverage-Fuzzing.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
-.cache: &cache_definition
- cache: &cache_configuration
+.cache_deps:
+ cache: &cache_deps_configuration
key:
files:
- Makefile
- - ruby/Gemfile.lock
- prefix: git-${GIT_VERSION}-ruby-${RUBY_VERSION}
+ prefix: git-${GIT_VERSION}
paths:
- _build/deps
+ policy: pull
+
+.cache_gems:
+ cache: &cache_gems_configuration
+ key:
+ files:
+ - ruby/Gemfile.lock
+ prefix: ruby-${RUBY_VERSION}
+ paths:
- ruby/vendor/bundle
policy: pull
.test_template: &test_definition
- <<: *cache_definition
stage: test
+ cache:
+ - *cache_deps_configuration
+ - *cache_gems_configuration
services:
- postgres:${POSTGRES_VERSION}
variables: &postgres_variables
@@ -87,8 +97,10 @@ danger-review:
build:
stage: build
cache:
- <<: *cache_configuration
- policy: pull-push
+ - <<: *cache_deps_configuration
+ policy: pull-push
+ - <<: *cache_gems_configuration
+ policy: pull-push
script:
- go version
- make all git
@@ -103,8 +115,9 @@ build:
- GO_VERSION: [ "1.16", "1.17" ]
build:binaries:
- <<: *cache_definition
stage: build
+ cache:
+ - *cache_deps_configuration
only:
- tags
script:
@@ -229,8 +242,9 @@ test:fuzz_objectinfo:
- ./gitlab-cov-fuzz run -- ./objectinfo_fuzzer -max_total_time=300
verify:
- <<: *cache_definition
stage: test
+ cache:
+ - *cache_gems_configuration
script:
- make verify
artifacts:
@@ -241,8 +255,9 @@ verify:
when: on_failure
dbschema:
- <<: *cache_definition
stage: test
+ cache:
+ - *cache_deps_configuration
services:
# The database version we use must match the version of `pg_dump` we have
# available in the build image.