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

cache.yml « positive_tests « yaml_tests « ci « schema « editor « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d50b74e14480ff35e4c6ad6aa7f08b4c8bdb6a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# valid cache:when values
job1:
  script:
    - echo 'running job'
  cache:
    when: 'on_success'

job2:
  script:
    - echo 'running job'
  cache:
    when: 'on_failure'

job3:
  script:
    - echo 'running job'
  cache:
    when: 'always'

# valid cache:paths
cache-paths:
  script: echo "This job uses a cache."
  cache:
    key: binaries-cache
    paths:
      - binaries/*.apk
      - .config

# valid cache:key
cache-key-string:
  script: echo "This job uses a cache."
  cache:
    key: random-string
    paths:
      - binaries/

cache-key-string-with-dots:
  script: echo "This job uses a cache."
  cache:
    key: random-..string
    paths:
      - binaries/

cache-key-string-beginning-with-dot:
  script: echo "This job uses a cache."
  cache:
    key: .random-string
    paths:
      - binaries/

cache-key-string-ending-with-dot:
  script: echo "This job uses a cache."
  cache:
    key: random-string.
    paths:
      - binaries/

cache-key-predefined-variable:
  script: echo "This job uses a cache."
  cache:
    key: $CI_COMMIT_REF_SLUG
    paths:
      - binaries/

cache-key-combination:
  script: echo "This job uses a cache."
  cache:
    key: binaries-cache-$CI_COMMIT_REF_SLUG
    paths:
      - binaries/

# valid cache:key:files
cache-key-files:
  script: echo "This job uses a cache."
  cache:
    key:
      files:
        - Gemfile.lock
        - package.json
    paths:
      - vendor/ruby
      - node_modules

# valide cache:key:prefix
cache-key-prefix-string:
  script: echo "This job uses a cache."
  cache:
    key:
      files:
        - Gemfile.lock
      prefix: random-string
    paths:
      - binaries/

cache-key-prefix-predefined-variable:
  script: echo "This job uses a cache."
  cache:
    key:
      files:
        - Gemfile.lock
      prefix: $CI_JOB_NAME
    paths:
      - binaries/

cache-key-prefix-combination:
  script: echo "This job uses a cache."
  cache:
    key:
      files:
        - Gemfile.lock
      prefix: binaries-cache-$CI_JOB_NAME
    paths:
      - binaries/

# valid cache:untracked
cache-untracked-true:
  script: test
  cache:
    untracked: true

cache-untracked-false:
  script: test
  cache:
    untracked: false

# valid cache:policy
cache-policy-push:
  script: echo "This job uses a cache."
  cache:
    policy: push

cache-policy-pull:
  script: echo "This job uses a cache."
  cache:
    policy: pull

cache-no-policy:
  script: echo "This job uses a cache."
  cache:
    paths:
      - binaries/