Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 09:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 09:08:01 +0300
commit8fb943c7df5f2b399caaeaebd6c00d0630bc763c (patch)
tree8d35d09078b03ff3db3a860babe8e6918eab8671 /doc/ci/caching
parent47946d47f3d8906b622cb27605195ea0ffcb095c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/caching')
-rw-r--r--doc/ci/caching/index.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/ci/caching/index.md b/doc/ci/caching/index.md
index 0109d87921b..a60310076a8 100644
--- a/doc/ci/caching/index.md
+++ b/doc/ci/caching/index.md
@@ -206,10 +206,11 @@ templates](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/t
### Caching Node.js dependencies
-Assuming your project is using [npm](https://www.npmjs.com/) or
-[Yarn](https://classic.yarnpkg.com/en/) to install the Node.js dependencies, the
-following example defines `cache` globally so that all jobs inherit it.
-Node.js modules are installed in `node_modules/` and are cached per-branch:
+Assuming your project is using [npm](https://www.npmjs.com/) to install the Node.js
+dependencies, the following example defines `cache` globally so that all jobs inherit it.
+By default, npm stores cache data in the home folder `~/.npm` but since
+[you can't cache things outside of the project directory](../yaml/README.md#cachepaths),
+we tell npm to use `./.npm` instead, and it is cached per-branch:
```yaml
#
@@ -221,10 +222,10 @@ image: node:latest
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- - node_modules/
+ - .npm/
before_script:
- - npm install
+ - npm ci --cache .npm --prefer-offline
test_async:
script: