Use OS-dependent cache key for specs
#7736 (closed) 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.
Currently, in https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/518a980bcf1c687b6246ccf56267a6f24c5ac114/gitlab-ci-config/gitlab-com.yml#L100-101:
.spec_template: &spec_template
extends: .gems-cache
.gems-cache
is used for:
generate-facts
spec-template
update-gems-cache
rubocop
yard
spec-template
should be treated differently here.