1 | # The logic for each $FARM is as follows:
|
---|
2 | #
|
---|
3 | # If the disable file exists, we are disabling the farm, or it's already
|
---|
4 | # disabled:
|
---|
5 | # - exists: [ .ci-farms-disabled/$FARM ]
|
---|
6 | # when: never
|
---|
7 | #
|
---|
8 | # Otherwise, changing the disable file means removing it, so we are
|
---|
9 | # re-enabling the farm:
|
---|
10 | # - changes: [ .ci-farms-disabled/$FARM ]
|
---|
11 | # if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
12 | # when: on_success
|
---|
13 | # Note: the "manual" variant of each farm rules changes the above to `never`,
|
---|
14 | # so that jobs meant to be manual don't run in re-enablement MRs. This is the
|
---|
15 | # only difference between `.$FARM-farm-rules` and `.$FARM-farm-manual-rules`.
|
---|
16 | #
|
---|
17 | # If any other disable file is modified, we are disabling/re-enabling another
|
---|
18 | # farm:
|
---|
19 | # - changes: [ .ci-farms-disabled/* ]
|
---|
20 | # if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
21 | # when: never
|
---|
22 | #
|
---|
23 | # The `not schedule` condition is there to make sure scheduled pipelines
|
---|
24 | # contains all the jobs, as `changes` conditions in scheduled pipelines are
|
---|
25 | # always evaluated to `true`.
|
---|
26 | #
|
---|
27 | # The "fallback", if none of these rules match, is usually the list of files
|
---|
28 | # that are used by a driver. See the various `.$DRIVER-rules` in the
|
---|
29 | # corresponding `src/**/ci/gitlab-ci.yml`.
|
---|
30 |
|
---|
31 | .microsoft-farm-rules:
|
---|
32 | rules:
|
---|
33 | - exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
|
---|
34 | when: never
|
---|
35 | - changes: [ .ci-farms-disabled/microsoft ] # 2. Removed from disabled, run
|
---|
36 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
37 | when: on_success
|
---|
38 | - changes: [ .ci-farms-disabled/* ] # 3. We touched other farms in MR, do not run
|
---|
39 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
40 | when: never
|
---|
41 | # 4. Fall-through (other rules or on_success)
|
---|
42 |
|
---|
43 | .microsoft-farm-manual-rules:
|
---|
44 | rules:
|
---|
45 | # Allow triggering jobs manually in other cases if any files affecting the
|
---|
46 | # pipeline were changed
|
---|
47 | - exists: [ .ci-farms-disabled/microsoft ]
|
---|
48 | when: never
|
---|
49 | - changes: [ .ci-farms-disabled/microsoft ]
|
---|
50 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
51 | when: never
|
---|
52 | - !reference [.microsoft-farm-rules, rules]
|
---|
53 |
|
---|
54 | .microsoft-farm-container-rules:
|
---|
55 | rules:
|
---|
56 | # Allow triggering jobs manually in other cases if any files affecting the
|
---|
57 | # pipeline were changed
|
---|
58 | - exists: [ .ci-farms-disabled/microsoft ]
|
---|
59 | when: never
|
---|
60 | - changes: [ .ci-farms-disabled/microsoft ]
|
---|
61 | if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
---|
62 | when: on_success
|
---|
63 | - changes: [ .ci-farms-disabled/microsoft ]
|
---|
64 | if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
65 | when: on_success
|
---|
66 | - changes: [ .ci-farms-disabled/microsoft ]
|
---|
67 | if: '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
|
---|
68 | when: on_success
|
---|
69 | - changes: [ .ci-farms-disabled/* ]
|
---|
70 | if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
---|
71 | when: never
|
---|
72 | - changes: [ .ci-farms-disabled/* ]
|
---|
73 | if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
74 | when: never
|
---|
75 | - changes: [ .ci-farms-disabled/* ]
|
---|
76 | if: '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
|
---|
77 | when: never
|
---|
78 |
|
---|
79 |
|
---|
80 | .collabora-farm-rules:
|
---|
81 | rules:
|
---|
82 | - exists: [ .ci-farms-disabled/collabora ]
|
---|
83 | when: never
|
---|
84 | - if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
85 | changes: [ .ci-farms-disabled/collabora ]
|
---|
86 | when: on_success
|
---|
87 | - if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
88 | changes: [ .ci-farms-disabled/* ]
|
---|
89 | when: never
|
---|
90 |
|
---|
91 | .collabora-farm-manual-rules:
|
---|
92 | rules:
|
---|
93 | - exists: [ .ci-farms-disabled/collabora ]
|
---|
94 | when: never
|
---|
95 | - if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
96 | changes: [ .ci-farms-disabled/collabora ]
|
---|
97 | when: never
|
---|
98 | - !reference [.collabora-farm-rules, rules]
|
---|
99 |
|
---|
100 |
|
---|
101 | .igalia-farm-rules:
|
---|
102 | rules:
|
---|
103 | - exists: [ .ci-farms-disabled/igalia ]
|
---|
104 | when: never
|
---|
105 | - changes: [ .ci-farms-disabled/igalia ]
|
---|
106 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
107 | when: on_success
|
---|
108 | - changes: [ .ci-farms-disabled/* ]
|
---|
109 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
110 | when: never
|
---|
111 |
|
---|
112 | .igalia-farm-manual-rules:
|
---|
113 | rules:
|
---|
114 | - exists: [ .ci-farms-disabled/igalia ]
|
---|
115 | when: never
|
---|
116 | - changes: [ .ci-farms-disabled/igalia ]
|
---|
117 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
118 | when: never
|
---|
119 | - !reference [.igalia-farm-rules, rules]
|
---|
120 |
|
---|
121 |
|
---|
122 | .lima-farm-rules:
|
---|
123 | rules:
|
---|
124 | - exists: [ .ci-farms-disabled/lima ]
|
---|
125 | when: never
|
---|
126 | - changes: [ .ci-farms-disabled/lima ]
|
---|
127 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
128 | when: on_success
|
---|
129 | - changes: [ .ci-farms-disabled/* ]
|
---|
130 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
131 | when: never
|
---|
132 |
|
---|
133 | .lima-farm-manual-rules:
|
---|
134 | rules:
|
---|
135 | - exists: [ .ci-farms-disabled/lima ]
|
---|
136 | when: never
|
---|
137 | - changes: [ .ci-farms-disabled/lima ]
|
---|
138 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
139 | when: never
|
---|
140 | - !reference [.lima-farm-rules, rules]
|
---|
141 |
|
---|
142 |
|
---|
143 | .anholt-farm-rules:
|
---|
144 | rules:
|
---|
145 | - exists: [ .ci-farms-disabled/anholt ]
|
---|
146 | when: never
|
---|
147 | - changes: [ .ci-farms-disabled/anholt ]
|
---|
148 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
149 | when: on_success
|
---|
150 | - changes: [ .ci-farms-disabled/* ]
|
---|
151 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
152 | when: never
|
---|
153 |
|
---|
154 | .anholt-farm-manual-rules:
|
---|
155 | rules:
|
---|
156 | - exists: [ .ci-farms-disabled/anholt ]
|
---|
157 | when: never
|
---|
158 | - changes: [ .ci-farms-disabled/anholt ]
|
---|
159 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
160 | when: never
|
---|
161 | - !reference [.anholt-farm-rules, rules]
|
---|
162 |
|
---|
163 |
|
---|
164 | .valve-farm-rules:
|
---|
165 | rules:
|
---|
166 | - exists: [ .ci-farms-disabled/valve-mupuf ]
|
---|
167 | if: '$RUNNER_FARM_LOCATION == "mupuf"'
|
---|
168 | when: never
|
---|
169 | - exists: [ .ci-farms-disabled/valve-kws ]
|
---|
170 | if: '$RUNNER_FARM_LOCATION == "keywords"'
|
---|
171 | when: never
|
---|
172 | - changes: [ .ci-farms-disabled/valve-mupuf ]
|
---|
173 | if: '$RUNNER_FARM_LOCATION == "mupuf" && $CI_PIPELINE_SOURCE != "schedule"'
|
---|
174 | when: on_success
|
---|
175 | - changes: [ .ci-farms-disabled/valve-kws ]
|
---|
176 | if: '$RUNNER_FARM_LOCATION == "keywords" && $CI_PIPELINE_SOURCE != "schedule"'
|
---|
177 | when: on_success
|
---|
178 | - changes: [ .ci-farms-disabled/* ]
|
---|
179 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
180 | when: never
|
---|
181 |
|
---|
182 | .valve-farm-manual-rules:
|
---|
183 | rules:
|
---|
184 | - exists: [ .ci-farms-disabled/valve-mupuf ]
|
---|
185 | if: '$RUNNER_FARM_LOCATION == "mupuf"'
|
---|
186 | when: never
|
---|
187 | - exists: [ .ci-farms-disabled/valve-kws ]
|
---|
188 | if: '$RUNNER_FARM_LOCATION == "keywords"'
|
---|
189 | when: never
|
---|
190 | - changes: [ .ci-farms-disabled/valve-mupuf ]
|
---|
191 | if: '$RUNNER_FARM_LOCATION == "mupuf" && $CI_PIPELINE_SOURCE != "schedule"'
|
---|
192 | when: never
|
---|
193 | - changes: [ .ci-farms-disabled/valve-kws ]
|
---|
194 | if: '$RUNNER_FARM_LOCATION == "keywords" && $CI_PIPELINE_SOURCE != "schedule"'
|
---|
195 | when: never
|
---|
196 | - !reference [.valve-farm-rules, rules]
|
---|
197 |
|
---|
198 |
|
---|
199 | .austriancoder-farm-rules:
|
---|
200 | rules:
|
---|
201 | - exists: [ .ci-farms-disabled/austriancoder ]
|
---|
202 | when: never
|
---|
203 | - changes: [ .ci-farms-disabled/austriancoder ]
|
---|
204 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
205 | when: on_success
|
---|
206 | - changes: [ .ci-farms-disabled/* ]
|
---|
207 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
208 | when: never
|
---|
209 |
|
---|
210 | .austriancoder-farm-manual-rules:
|
---|
211 | rules:
|
---|
212 | - exists: [ .ci-farms-disabled/austriancoder ]
|
---|
213 | when: never
|
---|
214 | - changes: [ .ci-farms-disabled/austriancoder ]
|
---|
215 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
216 | when: never
|
---|
217 | - !reference [.austriancoder-farm-rules, rules]
|
---|
218 |
|
---|
219 |
|
---|
220 | .freedreno-farm-rules:
|
---|
221 | rules:
|
---|
222 | - exists: [ .ci-farms-disabled/freedreno ]
|
---|
223 | when: never
|
---|
224 | - changes: [ .ci-farms-disabled/freedreno ]
|
---|
225 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
226 | when: on_success
|
---|
227 | - changes: [ .ci-farms-disabled/* ]
|
---|
228 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
229 | when: never
|
---|
230 |
|
---|
231 | .freedreno-farm-manual-rules:
|
---|
232 | rules:
|
---|
233 | - exists: [ .ci-farms-disabled/freedreno ]
|
---|
234 | when: never
|
---|
235 | - changes: [ .ci-farms-disabled/freedreno ]
|
---|
236 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
237 | when: never
|
---|
238 | - !reference [.freedreno-farm-rules, rules]
|
---|
239 |
|
---|
240 |
|
---|
241 | .ondracka-farm-rules:
|
---|
242 | rules:
|
---|
243 | - exists: [ .ci-farms-disabled/ondracka ]
|
---|
244 | when: never
|
---|
245 | - changes: [ .ci-farms-disabled/ondracka ]
|
---|
246 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
247 | when: on_success
|
---|
248 | - changes: [ .ci-farms-disabled/* ]
|
---|
249 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
250 | when: never
|
---|
251 |
|
---|
252 | .ondracka-farm-manual-rules:
|
---|
253 | rules:
|
---|
254 | - exists: [ .ci-farms-disabled/ondracka ]
|
---|
255 | when: never
|
---|
256 | - changes: [ .ci-farms-disabled/ondracka ]
|
---|
257 | if: '$CI_PIPELINE_SOURCE != "schedule"'
|
---|
258 | when: never
|
---|
259 | - !reference [.ondracka-farm-rules, rules]
|
---|
260 |
|
---|
261 |
|
---|
262 | # Skip container & build jobs when disabling any farm, and run them if any
|
---|
263 | # farm gets re-enabled.
|
---|
264 | # Only apply these rules in MR context, because otherwise we get a false
|
---|
265 | # positive on files being 'created' when pushing to a new branch, and break
|
---|
266 | # our pipeline
|
---|
267 | .disable-farm-mr-rules:
|
---|
268 | rules:
|
---|
269 | # changes(disabled) + exists(disabled) = disabling the farm
|
---|
270 | # Note: this cannot be simplified into a single `.ci-farms-disabled/*` rule
|
---|
271 | # because if there are more than one disabled farm and we only re-enable
|
---|
272 | # one, the exits(.ci-farms-disabled/*) would match and what should be
|
---|
273 | # a farm re-enable pipeline will be detected as a farm disable pipeline.
|
---|
274 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
275 | changes: [ .ci-farms-disabled/microsoft ]
|
---|
276 | exists: [ .ci-farms-disabled/microsoft ]
|
---|
277 | when: never
|
---|
278 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
279 | changes: [ .ci-farms-disabled/collabora ]
|
---|
280 | exists: [ .ci-farms-disabled/collabora ]
|
---|
281 | when: never
|
---|
282 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
283 | changes: [ .ci-farms-disabled/igalia ]
|
---|
284 | exists: [ .ci-farms-disabled/igalia ]
|
---|
285 | when: never
|
---|
286 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
287 | changes: [ .ci-farms-disabled/lima ]
|
---|
288 | exists: [ .ci-farms-disabled/lima ]
|
---|
289 | when: never
|
---|
290 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
291 | changes: [ .ci-farms-disabled/anholt ]
|
---|
292 | exists: [ .ci-farms-disabled/anholt ]
|
---|
293 | when: never
|
---|
294 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
295 | changes: [ .ci-farms-disabled/valve-mupuf ]
|
---|
296 | exists: [ .ci-farms-disabled/valve-mupuf ]
|
---|
297 | when: never
|
---|
298 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
299 | changes: [ .ci-farms-disabled/valve-kws ]
|
---|
300 | exists: [ .ci-farms-disabled/valve-kws ]
|
---|
301 | when: never
|
---|
302 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
303 | changes: [ .ci-farms-disabled/austriancoder ]
|
---|
304 | exists: [ .ci-farms-disabled/austriancoder ]
|
---|
305 | when: never
|
---|
306 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
307 | changes: [ .ci-farms-disabled/freedreno ]
|
---|
308 | exists: [ .ci-farms-disabled/freedreno ]
|
---|
309 | when: never
|
---|
310 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
---|
311 | changes: [ .ci-farms-disabled/ondracka ]
|
---|
312 | exists: [ .ci-farms-disabled/ondracka ]
|
---|
313 | when: never
|
---|
314 | # Any other change to ci-farms/* means some farm is getting re-enabled.
|
---|
315 | # Run jobs in Marge pipelines (and let it fallback to manual otherwise)
|
---|
316 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'
|
---|
317 | changes: [ .ci-farms/* ]
|
---|
318 | when: on_success
|
---|