As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit d4301bbc authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Use pull-push cache policy only when needed

parent 3eaa4ebe
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -19,6 +19,7 @@ variables:
DEBIAN_VERSION: "bullseye"
RUBY_VERSION: "ruby-3.2"
BUNDLE_PATH: vendor/ruby
CACHE_POLICY: pull
workflow:
rules: &workflow_rules
Loading
Loading
@@ -42,7 +43,6 @@ default:
# See https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/7019 for tag descriptions
- gitlab-org-docker
.cached-job:
cache:
- key:
Loading
Loading
@@ -52,12 +52,14 @@ default:
- go.sum
paths:
- .GOPATH/pkg/mod/
policy: $CACHE_POLICY
- key:
prefix: $RUBY_VERSION-cache
files:
- Gemfile.lock
paths:
- ${BUNDLE_PATH}
policy: $CACHE_POLICY
.go-matrix-job:
parallel:
Loading
Loading
@@ -68,16 +70,22 @@ default:
# Prepare jobs
################################################################################
.prepare-job:
extends:
- .cached-job
variables:
CACHE_POLICY: pull-push
bundle:install:
stage: prepare
extends: .cached-job
extends: .prepare-job
script:
- bundle install --jobs $(nproc)
modules:download:
stage: prepare
extends:
- .cached-job
- .prepare-job
- .go-matrix-job
script:
- go mod download
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