BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bc2214da
Commit
bc2214da
authored
Jan 22, 2016
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'doc_codeblock_fix' into 'master'
Fix broken codeblocks in ci/yaml documentation See merge request !2554
parents
a4a46437
22544132
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
README.md
doc/ci/yaml/README.md
+24
-19
No files found.
doc/ci/yaml/README.md
View file @
bc2214da
...
@@ -159,50 +159,55 @@ The `key` directive allows you to define the affinity of caching
...
@@ -159,50 +159,55 @@ The `key` directive allows you to define the affinity of caching
between jobs, allowing to have a single cache for all jobs,
between jobs, allowing to have a single cache for all jobs,
cache per-job, cache per-branch or any other way you deem proper.
cache per-job, cache per-branch or any other way you deem proper.
This allows you to fine tune caching, allowing you to cache data between
different jobs or even different branches.
This allows you to fine tune caching, allowing you to cache data between
The
`cache:key`
variable can use any of the
[
predefined variables
](
../variables/README.md
)
:
different jobs or even different branches.
Example configurations:
The
`cache:key`
variable can use any of the
[
predefined variables
](
../variables/README.md
)
.
---
**Example configurations**
To enable per-job caching:
To enable per-job caching:
```yaml
```
yaml
cache:
cache
:
key
:
"
$CI_BUILD_NAME"
key
:
"
$CI_BUILD_NAME"
untracked
:
true
untracked
:
true
```
```
To enable per-branch caching:
To enable per-branch caching:
```yaml
```
yaml
cache:
cache
:
key
:
"
$CI_BUILD_REF_NAME"
key
:
"
$CI_BUILD_REF_NAME"
untracked
:
true
untracked
:
true
```
```
To enable per-job and per-branch caching:
To enable per-job and per-branch caching:
```yaml
```
yaml
cache:
cache
:
key
:
"
$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
key
:
"
$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
untracked
:
true
untracked
:
true
```
```
To enable per-branch and per-stage caching:
To enable per-branch and per-stage caching:
```yaml
```
yaml
cache:
cache
:
key
:
"
$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
key
:
"
$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
untracked
:
true
untracked
:
true
```
```
If you use
**Windows Batch**
to run your shell scripts you need to replace the
`$`
with
`%`
:
If you use
**Windows Batch**
to run your shell scripts you need to replace
`$`
with
`%`
:
```yaml
```
yaml
cache:
cache
:
key
:
"
%CI_BUILD_STAGE%/%CI_BUILD_REF_NAME%"
key
:
"
%CI_BUILD_STAGE%/%CI_BUILD_REF_NAME%"
untracked
:
true
untracked
:
true
```
```
## Jobs
## Jobs
...
...
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