Skip to content
Snippets Groups Projects
Commit e5380cdc authored by Huste, Tobias's avatar Huste, Tobias Committed by Huste, Tobias
Browse files

Fix and improve caching in GitLab CI

parent f1b133aa
No related branches found
No related tags found
1 merge request!608Fix and improve caching in GitLab CI
......@@ -13,19 +13,20 @@ stages:
- public
expire_in: 1d
.cache_latest: &cache_latest
.caching: &caching
cache:
key: latest
paths:
- vendor/bundle
- assets/img/jumbotrons
.cache_production: &cache_production
cache:
key: production
paths:
- vendor/bundle
- assets/img/jumbotrons
- key:
files:
- Gemfile.lock
prefix: "$CI_JOB_IMAGE"
paths:
- vendor/bundle
- key: jumbotron-cache
paths:
- assets/img/jumbotrons/desktop
- assets/img/jumbotrons/display_2k
- assets/img/jumbotrons/phone
- assets/img/jumbotrons/tablet
.common_production: &production_before_script
before_script:
......@@ -36,7 +37,7 @@ stages:
- gem install bundler --no-document
- bundle config set without 'test'
- bundle install --jobs $(nproc)
<<: *cache_production
<<: *caching
.common_latest: &latest_before_script
before_script:
......@@ -48,7 +49,7 @@ stages:
- bundle config set without 'test'
- bundle install --jobs $(nproc) --without test "${FLAGS[@]}"
- bundle update --jobs $(nproc) "${FLAGS[@]}"
<<: *cache_latest
<<: *caching
.common_variables: &common_variables
GIT_SUBMODULE_STRATEGY: recursive
......@@ -109,7 +110,7 @@ stages:
--assume-extension public/"
# Use yaml-lint tool to check yaml files.
- "bundle exec yaml-lint _data/ _config.yml"
<<: *cache_production
<<: *caching
# https://docs.gitlab.com/ce/ci/yaml/#interruptible
interruptible: true
......
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