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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2023-03-10 09:51:46 +0300
committerStan Hu <stanhu@gmail.com>2023-03-10 09:54:50 +0300
commit9dba636b50ee8edb5ef73bc693c619cdc20ac3f4 (patch)
treef6ab37d82b42e6218f0ef1e02758d857b03b469e
parent9bbd3fcd06afb6937a62a264a605a2a7bb118489 (diff)
Separate Ruby cache keys for Debian and UBI images
Native gems such as re2 link against the system-installed shared libraries, and these libraries may differ between Debian and UBI-based images. We should not be reusing the Ruby bundler cache between Debian and UBI. Add a `IMAGE_FLAVOR` suffix to the cache key to ensure the caches remain independent. Relates to https://gitlab.com/gitlab-org/charts/gitlab/-/issues/4344
-rw-r--r--.gitlab/ci/common.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/debian.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/ubi.gitlab-ci.yml2
3 files changed, 8 insertions, 2 deletions
diff --git a/.gitlab/ci/common.gitlab-ci.yml b/.gitlab/ci/common.gitlab-ci.yml
index 95442b8f..f222a571 100644
--- a/.gitlab/ci/common.gitlab-ci.yml
+++ b/.gitlab/ci/common.gitlab-ci.yml
@@ -445,7 +445,7 @@
- fi
- echo -n "${CONTAINER_VERSION}" > artifacts/container_versions/gitlab-rails-ee_tag.txt
cache:
- key: "$CI_JOB_NAME-gitlab-rails-vendor-bundle-$RUBY_CACHE_KEY-$RAILS_CACHE_SUFFIX"
+ key: "$CI_JOB_NAME-gitlab-rails-vendor-bundle-$RUBY_CACHE_KEY-$IMAGE_FLAVOR-$RAILS_CACHE_SUFFIX"
paths:
- gitlab-rails/vendor/bundle
@@ -496,7 +496,7 @@
- fi
- echo -n "${CONTAINER_VERSION}" > artifacts/container_versions/gitlab-rails-ce_tag.txt
cache:
- key: "$CI_JOB_NAME-gitlab-rails-vendor-bundle-$RUBY_CACHE_KEY-$RAILS_CACHE_SUFFIX"
+ key: "$CI_JOB_NAME-gitlab-rails-vendor-bundle-$RUBY_CACHE_KEY-$IMAGE_FLAVOR-$RAILS_CACHE_SUFFIX"
paths:
- gitlab-rails/vendor/bundle
diff --git a/.gitlab/ci/debian.gitlab-ci.yml b/.gitlab/ci/debian.gitlab-ci.yml
index 87520f89..d1c29ace 100644
--- a/.gitlab/ci/debian.gitlab-ci.yml
+++ b/.gitlab/ci/debian.gitlab-ci.yml
@@ -145,6 +145,8 @@ gitlab-rails-ee:
- gitlab-ruby
- gitlab-elasticsearch-indexer
- gitlab-metrics-exporter
+ variables:
+ IMAGE_FLAVOR: 'debian'
gitlab-rails-ce:
extends: .gitlab-rails-ce
@@ -154,6 +156,8 @@ gitlab-rails-ce:
- gitlab-exiftool
- gitlab-ruby
- gitlab-metrics-exporter
+ variables:
+ IMAGE_FLAVOR: 'debian'
## phase six
diff --git a/.gitlab/ci/ubi.gitlab-ci.yml b/.gitlab/ci/ubi.gitlab-ci.yml
index aca54abe..54f976fb 100644
--- a/.gitlab/ci/ubi.gitlab-ci.yml
+++ b/.gitlab/ci/ubi.gitlab-ci.yml
@@ -487,6 +487,8 @@ gitlab-rails-ee:
- build:gitlab-exiftool
- build:gitlab-elasticsearch-indexer
- build:gitlab-gomplate
+ variables:
+ IMAGE_FLAVOR: 'ubi'
## phase six