Skip to content
Snippets Groups Projects
Unverified Commit cafd3709 authored by Stan Hu's avatar Stan Hu
Browse files

Use CI image name in gems cache key

https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7736 revealed
that we use Debian `bullseye` to build all native gems for the
specs. Since native gems may depend on system libraries or specific
versions of glibc, we should adjust the gem caching for the specs to
depend on the builder image.

This commit modifies the `spec_template` to use a cache key dependent
on the OS. The cache policy is also the default pull-push to avoid
needing a separate CI job to update this cache.

Relates to https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7737
parent 05bb18a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -88,6 +88,12 @@ variables:
- gems
policy: pull
 
.gems-cache-os-dependent:
cache:
key: "gems-cache-${CI_JOB_IMAGE}${CACHE_KEY_SUFFIX}"
paths:
- gems
before_script:
- echo "PIPELINE_TYPE detected as ${PIPELINE_TYPE}"
# Exit early if building on an OS for which we don't provide the specified
Loading
Loading
Loading
Loading
@@ -98,7 +98,7 @@
- if: '$PIPELINE_TYPE == "TRIGGER_CACHE_UPDATE_PIPELINE"'
 
.spec_template: &spec_template
extends: .gems-cache
extends: .gems-cache-os-dependent
stage: tests
before_script:
# These jobs will not be run on dev, so we set ALTERNATIVE_SOURCES to true
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment