Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
cce1792c
Commit
cce1792c
authored
Mar 03, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cache:key document
parent
aa5b9b16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+13
-4
No files found.
doc/ci/yaml/README.md
View file @
cce1792c
...
...
@@ -166,10 +166,11 @@ which can be set in GitLab's UI.
cached between jobs. You can only use paths that are within the project
workspace.
**By default the caching is enabled per-job and per-branch.**
**
By default caching is enabled and shared between each pipelines and
each jobs, starting from GitLab 9.0
**
If
`cache`
is defined outside the scope of
the
jobs, it means it is set
globally and all jobs will use
its
definition.
If
`cache`
is defined outside the scope of jobs, it means it is set
globally and all jobs will use
that
definition.
Cache all files in
`binaries`
and
`.config`
:
...
...
@@ -202,7 +203,7 @@ rspec:
-
binaries/
```
Locally defined cache over
writ
es globally defined options. The following
`rspec`
Locally defined cache over
rid
es globally defined options. The following
`rspec`
job will cache only
`binaries/`
:
```
yaml
...
...
@@ -213,10 +214,15 @@ cache:
rspec
:
script
:
test
cache
:
key
:
rspec
paths
:
-
binaries/
```
Note that since cache is shared between each jobs, if you're using different
paths for different jobs, you should also set a different
*cache:key*
otherwise they could be overwriting to each other.
The cache is provided on a best-effort basis, so don't expect that the cache
will be always present. For implementation details, please check GitLab Runner.
...
...
@@ -233,6 +239,9 @@ different jobs or even different branches.
The
`cache:key`
variable can use any of the
[
predefined variables
](
../variables/README.md
)
.
The default key is
**default**
across the project, therefore everything is
shared between each pipelines and jobs by default, starting from GitLab 9.0.
---
**Example configurations**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment