Commit b069150f authored by Mike Greiling's avatar Mike Greiling

Merge branch 'ci-cache-webpack' into 'master'

Cache webpack loaders in CI

See merge request gitlab-org/gitlab!22204
parents fb47b78a 62f3c0e8
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
- vendor/ruby/ - vendor/ruby/
- .yarn-cache/ - .yarn-cache/
- tmp/cache/assets/sprockets - tmp/cache/assets/sprockets
- tmp/cache/babel-loader
- tmp/cache/vue-loader
.gitlab:assets:compile-metadata: .gitlab:assets:compile-metadata:
extends: extends:
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375
cache: cache:
key: "assets-compile:production:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:v6" key: "assets-compile:production:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:tmp_cache_webpack:v7"
artifacts: artifacts:
name: webpack-report name: webpack-report
expire_in: 31d expire_in: 31d
...@@ -84,7 +86,7 @@ gitlab:assets:compile pull-cache: ...@@ -84,7 +86,7 @@ gitlab:assets:compile pull-cache:
# we override the max_old_space_size to prevent OOM errors # we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584 NODE_OPTIONS: --max_old_space_size=3584
cache: cache:
key: "assets-compile:v7" key: "assets-compile:v8"
artifacts: artifacts:
expire_in: 7d expire_in: 7d
paths: paths:
...@@ -106,7 +108,7 @@ compile-assets pull-push-cache foss: ...@@ -106,7 +108,7 @@ compile-assets pull-push-cache foss:
- master - master
cache: cache:
policy: pull-push policy: pull-push
key: "assets-compile:v7:foss" key: "assets-compile:v8:foss"
compile-assets pull-cache: compile-assets pull-cache:
extends: .compile-assets-metadata extends: .compile-assets-metadata
...@@ -117,7 +119,7 @@ compile-assets pull-cache foss: ...@@ -117,7 +119,7 @@ compile-assets pull-cache foss:
extends: [".compile-assets-metadata", ".only-ee-as-if-foss"] extends: [".compile-assets-metadata", ".only-ee-as-if-foss"]
cache: cache:
policy: pull policy: pull
key: "assets-compile:v7:foss" key: "assets-compile:v8:foss"
.only-code-frontend-job-base: .only-code-frontend-job-base:
extends: extends:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment