Commit 791dd5a6 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '32219-speed-up-yarn-install-in-ci-by-utilizing-inter-pipeline-cache' into 'master'

Resolve "Speed up `yarn install` in CI by utilizing inter-pipeline cache"

Closes #32219

See merge request !11343
parents 3599d9ab 1f581d76
...@@ -18,6 +18,7 @@ eslint-report.html ...@@ -18,6 +18,7 @@ eslint-report.html
.sass-cache/ .sass-cache/
/.secret /.secret
/.vagrant /.vagrant
/.yarn-cache
/.byebug_history /.byebug_history
/Vagrantfile /Vagrantfile
/backups/* /backups/*
......
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6" image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6"
cache: cache:
key: "ruby-233" key: "ruby-233-with-yarn"
paths: paths:
- vendor/ruby - vendor/ruby
- .yarn-cache/
variables: variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1" MYSQL_ALLOW_EMPTY_PASSWORD: "1"
...@@ -186,7 +187,7 @@ setup-test-env: ...@@ -186,7 +187,7 @@ setup-test-env:
stage: prepare stage: prepare
script: script:
- node --version - node --version
- yarn install --pure-lockfile - yarn install --pure-lockfile --cache-folder .yarn-cache
- bundle exec rake gitlab:assets:compile - bundle exec rake gitlab:assets:compile
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
artifacts: artifacts:
...@@ -400,7 +401,8 @@ rake gitlab:assets:compile: ...@@ -400,7 +401,8 @@ rake gitlab:assets:compile:
SKIP_STORAGE_VALIDATION: "true" SKIP_STORAGE_VALIDATION: "true"
WEBPACK_REPORT: "true" WEBPACK_REPORT: "true"
script: script:
- bundle exec rake yarn:install gitlab:assets:compile - yarn install --pure-lockfile --production --cache-folder .yarn-cache
- bundle exec rake gitlab:assets:compile
artifacts: artifacts:
name: webpack-report name: webpack-report
expire_in: 31d expire_in: 31d
......
---
title: Cache npm modules between pipelines with yarn to speed up setup-test-env
merge_request: 11343
author:
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