This instance will be upgraded to Heptapod 0.31.0rc on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

global.gitlab-ci.yml 6.07 KB
Newer Older
Stan Hu's avatar
Stan Hu committed
1
2
3
4
5
.default-tags:
  tags:
    - gitlab-org

.default-retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
6
  retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
7
    max: 2  # This is confusing but this means "3 runs at max".
Kamil Trzciński's avatar
Kamil Trzciński committed
8
9
10
11
12
    when:
      - unknown_failure
      - api_failure
      - runner_system_failure

Stan Hu's avatar
Stan Hu committed
13
14
15
.default-before_script:
  before_script:
    - date
16
17
    - export GOPATH=$CI_PROJECT_DIR/.go
    - mkdir -p $GOPATH
Stan Hu's avatar
Stan Hu committed
18
19
20
    - source scripts/utils.sh
    - source scripts/prepare_build.sh
    - date
Kamil Trzciński's avatar
Kamil Trzciński committed
21
22

# Jobs that only need to pull cache
Stan Hu's avatar
Stan Hu committed
23
.default-cache:
Kamil Trzciński's avatar
Kamil Trzciński committed
24
  cache:
Stan Hu's avatar
Stan Hu committed
25
26
    key: "debian-stretch-ruby-2.6.3-node-12.x"
    paths:
27
      - .go/pkg/mod
Stan Hu's avatar
Stan Hu committed
28
29
30
      - vendor/ruby
      - .yarn-cache/
      - vendor/gitaly-ruby
Kamil Trzciński's avatar
Kamil Trzciński committed
31
32
    policy: pull

33
34
.default-only:
  only:
Philippe Lafoucrière's avatar
Philippe Lafoucrière committed
35
    refs:
36
37
38
      - master
      - /^[\d-]+-stable(-ee)?$/
      - /^\d+-\d+-auto-deploy-\d+$/
39
      - /^security\//
40
41
      - merge_requests
      - tags
Philippe Lafoucrière's avatar
Philippe Lafoucrière committed
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
.code-patterns: &code-patterns
  - ".gitlab/ci/**/*"
  - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
  - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
  - ".csscomb.json"
  - "Dockerfile.assets"
  - "*_VERSION"
  - "Gemfile{,.lock}"
  - "Rakefile"
  - "{babel.config,jest.config}.js"
  - "config.ru"
  - "{package.json,yarn.lock}"
  - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"

.backstage-patterns: &backstage-patterns
  - "Dangerfile"
  - "danger/**/*"
  - "{,ee/}fixtures/**/*"
  - "{,ee/}rubocop/**/*"
  - "{,ee/}spec/**/*"
  - "doc/README.md"  # Some RSpec test rely on this file

.qa-patterns: &qa-patterns
  - ".dockerignore"
  - "qa/**/*"

.docs-patterns: &docs-patterns
  - ".gitlab/route-map.yml"
  - "doc/**/*"
  - ".markdownlint.json"

.graphql-patterns: &graphql-patterns
  - "{,ee/}app/graphql/**/*"
  - "{,ee/}lib/gitlab/graphql/**/*"

.only:changes-code:
  only:
    changes: *code-patterns

.only:changes-qa:
  only:
    changes: *qa-patterns

.only:changes-docs:
  only:
    changes: *docs-patterns

.only:changes-graphql:
  only:
    changes: *graphql-patterns

.only:changes-code-backstage:
95
96
97
98
99
100
101
102
103
104
105
106
107
  only:
    changes:
      - ".gitlab/ci/**/*"
      - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
      - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
      - ".csscomb.json"
      - "Dockerfile.assets"
      - "*_VERSION"
      - "Gemfile{,.lock}"
      - "Rakefile"
      - "{babel.config,jest.config}.js"
      - "config.ru"
      - "{package.json,yarn.lock}"
108
109
110
111
112
113
114
      - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
      # Backstage changes
      - "Dangerfile"
      - "danger/**/*"
      - "{,ee/}fixtures/**/*"
      - "{,ee/}rubocop/**/*"
      - "{,ee/}spec/**/*"
115
      - "doc/README.md"  # Some RSpec test rely on this file
Kamil Trzciński's avatar
Kamil Trzciński committed
116

117
.only:changes-code-qa:
118
119
  only:
    changes:
120
121
122
123
124
125
126
127
128
129
130
131
132
      - ".gitlab/ci/**/*"
      - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
      - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
      - ".csscomb.json"
      - "Dockerfile.assets"
      - "*_VERSION"
      - "Gemfile{,.lock}"
      - "Rakefile"
      - "{babel.config,jest.config}.js"
      - "config.ru"
      - "{package.json,yarn.lock}"
      - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
      # QA changes
133
134
      - ".dockerignore"
      - "qa/**/*"
135

136
.only:changes-code-backstage-qa:
137
  only:
138
139
140
141
142
143
144
145
146
147
148
149
    changes:
      - ".gitlab/ci/**/*"
      - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
      - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
      - ".csscomb.json"
      - "Dockerfile.assets"
      - "*_VERSION"
      - "Gemfile{,.lock}"
      - "Rakefile"
      - "{babel.config,jest.config}.js"
      - "config.ru"
      - "{package.json,yarn.lock}"
150
151
152
153
154
155
156
      - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
      # Backstage changes
      - "Dangerfile"
      - "danger/**/*"
      - "{,ee/}fixtures/**/*"
      - "{,ee/}rubocop/**/*"
      - "{,ee/}spec/**/*"
157
      - "doc/README.md"  # Some RSpec test rely on this file
158
      # QA changes
159
160
161
162
163
164
165
      - ".dockerignore"
      - "qa/**/*"

.only-review:
  only:
    variables:
      - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
166
167
168
169
170
    kubernetes: active
  except:
    refs:
      - master
      - /^\d+-\d+-auto-deploy-\d+$/
171
      - /^[\d-]+-stable(-ee)?$/
172
173
174
175
176
177

.only-review-schedules:
  only:
    refs:
      - schedules
    variables:
178
      - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
179
    kubernetes: active
Stan Hu's avatar
Stan Hu committed
180

181
182
183
184
185
186
.only-canonical-schedules:
  only:
    refs:
      - schedules@gitlab-org/gitlab
      - schedules@gitlab-org/gitlab-foss

187
.use-pg9:
Stan Hu's avatar
Stan Hu committed
188
  services:
189
    - name: postgres:9.6
Stan Hu's avatar
Stan Hu committed
190
191
192
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine

193
.use-pg10:
194
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.11-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
Stan Hu's avatar
Stan Hu committed
195
196
197
198
  services:
    - name: postgres:10.9
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
199

200
201
202
203
204
205
206
207
.use-pg9-ee:
  services:
    - name: postgres:9.6
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
    - name: docker.elastic.co/elasticsearch/elasticsearch:5.6.12

.use-pg10-ee:
208
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.11-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
209
210
211
212
213
214
  services:
    - name: postgres:10.9
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
    - name: docker.elastic.co/elasticsearch/elasticsearch:5.6.12

215
216
217
.only-ee:
  only:
    variables:
218
      - $CI_PROJECT_NAME == "gitlab"
219
      - $CI_PROJECT_NAME == "gitlab-ee"  # Support former project name for forks/mirrors
220
221
222
223

.only-ee-as-if-foss:
  extends: .only-ee
  variables:
224
    FOSS_ONLY: '1'