mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 20:56:08 +10:00
Added cache:key to .gitlab-ci.yml allowing to fine tune the caching
The `cache:key` allows you to define the affinity mask of caching, allowing to have single cache for all jobs, or cache per-job, or per-branch, or any other way you would need:
1. Cache per-build for all branches:
```
cache:
key: "$CI_BUILD_NAME"
untracked: true
```
2. Cache per-branch for all jobs:
```
cache:
key: "$CI_BUILD_REF"
untracked: true
```
/cc @DouweM @grzesiek @axil
See merge request !2436
GitLab CI Documentation
User documentation
- Quick Start
- Enable or disable GitLab CI
- Configuring project (.gitlab-ci.yml)
- Configuring runner
- Configuring deployment
- Using Docker Images
- Using Docker Build
- Using Variables
- Using SSH keys
- Triggering builds through the API
- Build artifacts
Languages
Services
Examples
- The .gitlab-ci.yml file for GitLab itself
- Test and deploy Ruby applications to Heroku
- Test and deploy Python applications to Heroku
- Test Clojure applications
- Help your favorite programming language and GitLab by sending a merge request with a guide for that language.