blob: f07a85906cc2467ed8087d39f228e8d02575c1ce [file] [log] [blame]
James E. Blaircdd00072012-06-08 19:17:28 -07001:title: Zuul
2
3Zuul
4====
5
6Configuration
7-------------
8
9Zuul has three configuration files:
10
11**zuul.conf**
James E. Blair1f4c2bb2013-04-26 08:40:46 -070012 Connection information for Gerrit and Gearman, locations of the
Thanh Ha266cbb82016-01-24 20:57:59 -050013 other config files. (required)
James E. Blaircdd00072012-06-08 19:17:28 -070014**layout.yaml**
Thanh Ha266cbb82016-01-24 20:57:59 -050015 Project and pipeline configuration -- what Zuul does. (required)
James E. Blaircdd00072012-06-08 19:17:28 -070016**logging.conf**
Thanh Ha266cbb82016-01-24 20:57:59 -050017 Python logging config. (optional)
James E. Blaircdd00072012-06-08 19:17:28 -070018
19Examples of each of the three files can be found in the etc/ directory
20of the source distribution.
21
James E. Blair6aea36d2012-12-17 13:03:24 -080022.. _zuulconf:
23
James E. Blaircdd00072012-06-08 19:17:28 -070024zuul.conf
25~~~~~~~~~
26
27Zuul will look for ``/etc/zuul/zuul.conf`` or ``~/zuul.conf`` to
28bootstrap its configuration. Alternately, you may specify ``-c
29/path/to/zuul.conf`` on the command line.
30
James E. Blair1f4c2bb2013-04-26 08:40:46 -070031Gerrit and Gearman connection information are each described in a
32section of zuul.conf. The location of the other two configuration
33files (as well as the location of the PID file when running Zuul as a
34server) are specified in a third section.
James E. Blaircdd00072012-06-08 19:17:28 -070035
Clark Boylan9b670902012-09-28 13:47:56 -070036The three sections of this config and their options are documented below.
37You can also find an example zuul.conf file in the git
38`repository
Andreas Jaegerbcfbf932014-09-29 20:21:44 +020039<https://git.openstack.org/cgit/openstack-infra/zuul/tree/etc/zuul.conf-sample>`_
Clark Boylan9b670902012-09-28 13:47:56 -070040
James E. Blair1f4c2bb2013-04-26 08:40:46 -070041gearman
Clark Boylan9b670902012-09-28 13:47:56 -070042"""""""
43
Thanh Ha266cbb82016-01-24 20:57:59 -050044Client connection information for gearman. If using Zuul's builtin gearmand
45server just set **server** to 127.0.0.1.
46
Clark Boylan9b670902012-09-28 13:47:56 -070047**server**
James E. Blair1f4c2bb2013-04-26 08:40:46 -070048 Hostname or IP address of the Gearman server.
Thanh Ha266cbb82016-01-24 20:57:59 -050049 ``server=gearman.example.com`` (required)
Clark Boylan9b670902012-09-28 13:47:56 -070050
James E. Blair1f4c2bb2013-04-26 08:40:46 -070051**port**
Łukasz Jernaś048acb42014-03-02 18:49:41 +010052 Port on which the Gearman server is listening.
Thanh Ha266cbb82016-01-24 20:57:59 -050053 ``port=4730`` (optional)
Clark Boylan9b670902012-09-28 13:47:56 -070054
Paul Belanger0a21f0a2017-06-13 13:14:42 -040055**ssl_ca**
56 Optional: An openssl file containing a set of concatenated “certification authority” certificates
57 in PEM formet.
58
59**ssl_cert**
60 Optional: An openssl file containing the client public certificate in PEM format.
61
62**ssl_key**
63 Optional: An openssl file containing the client private key in PEM format.
64
James E. Blair77cc7b82013-07-15 13:22:37 -070065gearman_server
66""""""""""""""
67
Thanh Ha266cbb82016-01-24 20:57:59 -050068The builtin gearman server. Zuul can fork a gearman process from itself rather
69than connecting to an external one.
70
James E. Blair77cc7b82013-07-15 13:22:37 -070071**start**
72 Whether to start the internal Gearman server (default: False).
73 ``start=true``
74
James E. Blair0ac452e2015-07-22 09:05:16 -070075**listen_address**
76 IP address or domain name on which to listen (default: all addresses).
77 ``listen_address=127.0.0.1``
78
James E. Blair77cc7b82013-07-15 13:22:37 -070079**log_config**
80 Path to log config file for internal Gearman server.
81 ``log_config=/etc/zuul/gearman-logging.yaml``
82
Paul Belanger0a21f0a2017-06-13 13:14:42 -040083**ssl_ca**
84 Optional: An openssl file containing a set of concatenated “certification authority” certificates
85 in PEM formet.
86
87**ssl_cert**
88 Optional: An openssl file containing the server public certificate in PEM format.
89
90**ssl_key**
91 Optional: An openssl file containing the server private key in PEM format.
92
Paul Belanger88ef0ea2015-12-23 11:57:02 -050093webapp
94""""""
95
96**listen_address**
97 IP address or domain name on which to listen (default: 0.0.0.0).
98 ``listen_address=127.0.0.1``
99
100**port**
101 Port on which the webapp is listening (default: 8001).
102 ``port=8008``
103
Clark Boylan9b670902012-09-28 13:47:56 -0700104zuul
105""""
106
Thanh Ha266cbb82016-01-24 20:57:59 -0500107Zuul's main configuration section. At minimum zuul must be able to find
108layout.yaml to be useful.
109
110.. note:: Must be provided when running zuul-server
111
Antoine Musso9adc6d42014-11-14 15:37:48 +0100112.. _layout_config:
113
Clark Boylan9b670902012-09-28 13:47:56 -0700114**layout_config**
James E. Blair4076e2b2014-01-28 12:42:20 -0800115 Path to layout config file. Used by zuul-server only.
Clark Boylan9b670902012-09-28 13:47:56 -0700116 ``layout_config=/etc/zuul/layout.yaml``
117
118**log_config**
James E. Blaira4430132014-02-17 08:32:07 -0800119 Path to log config file. Used by zuul-server only.
Clark Boylan9b670902012-09-28 13:47:56 -0700120 ``log_config=/etc/zuul/logging.yaml``
121
122**pidfile**
James E. Blaira4430132014-02-17 08:32:07 -0800123 Path to PID lock file. Used by zuul-server only.
Clark Boylan9b670902012-09-28 13:47:56 -0700124 ``pidfile=/var/run/zuul/zuul.pid``
125
126**state_dir**
James E. Blair4076e2b2014-01-28 12:42:20 -0800127 Path to directory that Zuul should save state to. Used by all Zuul
128 commands.
Clark Boylan9b670902012-09-28 13:47:56 -0700129 ``state_dir=/var/lib/zuul``
130
David Shrewsburyd6784292017-04-13 12:08:29 -0400131**jobroot_dir**
132 Path to directory that Zuul should store temporary job files.
133 ``jobroot_dir=/tmp``
134
James E. Blair4076e2b2014-01-28 12:42:20 -0800135**report_times**
136 Boolean value (``true`` or ``false``) that determines if Zuul should
137 include elapsed times for each job in the textual report. Used by
138 zuul-server only.
139 ``report_times=true``
140
141**status_url**
142 URL that will be posted in Zuul comments made to Gerrit changes when
143 starting jobs for a change. Used by zuul-server only.
144 ``status_url=https://zuul.example.com/status``
145
Clark Boylane0b4bdb2014-06-03 17:01:25 -0700146**status_expiry**
147 Zuul will cache the status.json file for this many seconds. This is an
148 optional value and ``1`` is used by default.
149 ``status_expiry=1``
150
James E. Blair4076e2b2014-01-28 12:42:20 -0800151
152merger
153""""""
154
Thanh Ha266cbb82016-01-24 20:57:59 -0500155The zuul-merger process configuration. Detailed documentation on this process
156can be found on the :doc:`merger` page.
157
158.. note:: Must be provided when running zuul-merger. Both services may share the
159 same configuration (and even host) or otherwise have an individual
160 zuul.conf.
161
Clark Boylan9b670902012-09-28 13:47:56 -0700162**git_dir**
163 Directory that Zuul should clone local git repositories to.
164 ``git_dir=/var/lib/zuul/git``
165
Paul Belangerb67aba12013-05-13 19:22:14 -0400166**git_user_email**
167 Optional: Value to pass to `git config user.email`.
168 ``git_user_email=zuul@example.com``
169
170**git_user_name**
171 Optional: Value to pass to `git config user.name`.
172 ``git_user_name=zuul``
173
Arx Cruzb1b010d2013-10-28 19:49:59 -0200174**zuul_url**
James E. Blair4076e2b2014-01-28 12:42:20 -0800175 URL of this merger's git repos, accessible to test workers. Usually
176 "http://zuul.example.com/p" or "http://zuul-merger01.example.com/p"
177 depending on whether the merger is co-located with the Zuul server.
Arx Cruzb1b010d2013-10-28 19:49:59 -0200178
James E. Blaira4430132014-02-17 08:32:07 -0800179**log_config**
180 Path to log config file for the merger process.
181 ``log_config=/etc/zuul/logging.yaml``
182
183**pidfile**
184 Path to PID lock file for the merger process.
185 ``pidfile=/var/run/zuul-merger/merger.pid``
186
David Shrewsburye7374202017-04-27 12:28:45 -0400187executor
188""""""""
189
190The zuul-executor process configuration.
191
Tobias Henkelcec29662017-06-02 12:27:47 +0200192**finger_port**
193 Port to use for finger log streamer.
194 ``finger_port=79``
195
David Shrewsburye7374202017-04-27 12:28:45 -0400196**git_dir**
197 Directory that Zuul should clone local git repositories to.
198 ``git_dir=/var/lib/zuul/git``
199
200**log_config**
201 Path to log config file for the executor process.
202 ``log_config=/etc/zuul/logging.yaml``
203
204**private_key_file**
205 SSH private key file to be used when logging into worker nodes.
206 ``private_key_file=~/.ssh/id_rsa``
207
208**user**
209 User ID for the zuul-executor process. In normal operation as a daemon,
210 the executor should be started as the ``root`` user, but it will drop
211 privileges to this user during startup.
212 ``user=zuul``
213
Joshua Heskethfe485c62015-08-11 23:42:34 +1000214.. _connection:
215
216connection ArbitraryName
217""""""""""""""""""""""""
218
219A connection can be listed with any arbitrary name. The required
220parameters are specified in the :ref:`connections` documentation
221depending on what driver you are using.
222
223.. _layoutyaml:
224
James E. Blaircdd00072012-06-08 19:17:28 -0700225layout.yaml
226~~~~~~~~~~~
227
Clark Boylan00635dc2012-09-19 14:03:08 -0700228This is the main configuration file for Zuul, where all of the pipelines
James E. Blaircdd00072012-06-08 19:17:28 -0700229and projects are defined, what tests should be run, and what actions
Clark Boylan00635dc2012-09-19 14:03:08 -0700230Zuul should perform. There are three sections: pipelines, jobs, and
James E. Blaircdd00072012-06-08 19:17:28 -0700231projects.
232
Clark Boylan00635dc2012-09-19 14:03:08 -0700233Pipelines
234"""""""""
James E. Blaircdd00072012-06-08 19:17:28 -0700235
Clark Boylan00635dc2012-09-19 14:03:08 -0700236Zuul can have any number of independent pipelines. Whenever a matching
237Gerrit event is found for a pipeline, that event is added to the
238pipeline, and the jobs specified for that pipeline are run. When all
239jobs specified for the pipeline that were triggered by an event are
240completed, Zuul reports back to Gerrit the results.
James E. Blaircdd00072012-06-08 19:17:28 -0700241
Clark Boylan00635dc2012-09-19 14:03:08 -0700242There are no pre-defined pipelines in Zuul, rather you can define
243whatever pipelines you need in the layout file. This is a very flexible
244system that can accommodate many kinds of workflows.
James E. Blaircdd00072012-06-08 19:17:28 -0700245
Clark Boylan00635dc2012-09-19 14:03:08 -0700246Here is a quick example of a pipeline definition followed by an
James E. Blaircdd00072012-06-08 19:17:28 -0700247explanation of each of the parameters::
248
249 - name: check
Clark Boylan00635dc2012-09-19 14:03:08 -0700250 manager: IndependentPipelineManager
Joshua Heskethfe485c62015-08-11 23:42:34 +1000251 source: my_gerrit
James E. Blaircdd00072012-06-08 19:17:28 -0700252 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000253 my_gerrit:
James E. Blair6c358e72013-07-29 17:06:47 -0700254 - event: patchset-created
James E. Blaircdd00072012-06-08 19:17:28 -0700255 success:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000256 my_gerrit:
257 verified: 1
James E. Blaircdd00072012-06-08 19:17:28 -0700258 failure:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000259 my_gerrit
260 verified: -1
James E. Blaircdd00072012-06-08 19:17:28 -0700261
262**name**
263 This is used later in the project definition to indicate what jobs
Clark Boylan00635dc2012-09-19 14:03:08 -0700264 should be run for events in the pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700265
James E. Blair8dbd56a2012-12-22 10:55:10 -0800266**description**
267 This is an optional field that may be used to provide a textual
268 description of the pipeline.
269
James E. Blairc0dedf82014-08-06 09:37:52 -0700270**source**
Joshua Heskethfe485c62015-08-11 23:42:34 +1000271 A required field that specifies a connection that provides access to
272 the change objects that this pipeline operates on. The name of the
273 connection as per the zuul.conf should be specified. The driver used
274 for the connection named will be the source. Currently only ``gerrit``
275 drivers are supported.
James E. Blairc0dedf82014-08-06 09:37:52 -0700276
James E. Blair56370192013-01-14 15:47:28 -0800277**success-message**
278 An optional field that supplies the introductory text in message
279 reported back to Gerrit when all the voting builds are successful.
280 Defaults to "Build successful."
281
282**failure-message**
283 An optional field that supplies the introductory text in message
284 reported back to Gerrit when at least one voting build fails.
285 Defaults to "Build failed."
286
Joshua Heskethb7179772014-01-30 23:30:46 +1100287**merge-failure-message**
288 An optional field that supplies the introductory text in message
289 reported back to Gerrit when a change fails to merge with the
290 current state of the repository.
291 Defaults to "Merge failed."
292
Joshua Hesketh3979e3e2014-03-04 11:21:10 +1100293**footer-message**
294 An optional field to supply additional information after test results.
295 Useful for adding information about the CI system such as debugging
296 and contact details.
297
James E. Blaircdd00072012-06-08 19:17:28 -0700298**manager**
Clark Boylan00635dc2012-09-19 14:03:08 -0700299 There are currently two schemes for managing pipelines:
James E. Blaircdd00072012-06-08 19:17:28 -0700300
Clark Boylan00635dc2012-09-19 14:03:08 -0700301 *IndependentPipelineManager*
302 Every event in this pipeline should be treated as independent of
303 other events in the pipeline. This is appropriate when the order of
304 events in the pipeline doesn't matter because the results of the
305 actions this pipeline performs can not affect other events in the
306 pipeline. For example, when a change is first uploaded for review,
James E. Blaircdd00072012-06-08 19:17:28 -0700307 you may want to run tests on that change to provide early feedback
308 to reviewers. At the end of the tests, the change is not going to
309 be merged, so it is safe to run these tests in parallel without
Clark Boylan00635dc2012-09-19 14:03:08 -0700310 regard to any other changes in the pipeline. They are independent.
James E. Blaircdd00072012-06-08 19:17:28 -0700311
Clark Boylan00635dc2012-09-19 14:03:08 -0700312 Another type of pipeline that is independent is a post-merge
313 pipeline. In that case, the changes have already merged, so the
314 results can not affect any other events in the pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700315
Clark Boylan00635dc2012-09-19 14:03:08 -0700316 *DependentPipelineManager*
317 The dependent pipeline manager is designed for gating. It ensures
James E. Blaircdd00072012-06-08 19:17:28 -0700318 that every change is tested exactly as it is going to be merged
319 into the repository. An ideal gating system would test one change
320 at a time, applied to the tip of the repository, and only if that
321 change passed tests would it be merged. Then the next change in
322 line would be tested the same way. In order to achieve parallel
Clark Boylan00635dc2012-09-19 14:03:08 -0700323 testing of changes, the dependent pipeline manager performs
James E. Blaircdd00072012-06-08 19:17:28 -0700324 speculative execution on changes. It orders changes based on
Clark Boylan00635dc2012-09-19 14:03:08 -0700325 their entry into the pipeline. It begins testing all changes in
326 parallel, assuming that each change ahead in the pipeline will pass
James E. Blaircdd00072012-06-08 19:17:28 -0700327 its tests. If they all succeed, all the changes can be tested and
Clark Boylan00635dc2012-09-19 14:03:08 -0700328 merged in parallel. If a change near the front of the pipeline
329 fails its tests, each change behind it ignores whatever tests have
330 been completed and are tested again without the change in front.
331 This way gate tests may run in parallel but still be tested
332 correctly, exactly as they will appear in the repository when
333 merged.
James E. Blaircdd00072012-06-08 19:17:28 -0700334
Clark Boylan00635dc2012-09-19 14:03:08 -0700335 One important characteristic of the DependentPipelineManager is that
James E. Blaircdd00072012-06-08 19:17:28 -0700336 it analyzes the jobs that are triggered by different projects, and
337 if those projects have jobs in common, it treats those projects as
338 related, and they share a single virtual queue of changes. Thus,
339 if there is a job that performs integration testing on two
340 projects, those two projects will automatically share a virtual
341 change queue. If a third project does not invoke that job, it
Clark Boylan00635dc2012-09-19 14:03:08 -0700342 will be part of a separate virtual change queue, and changes to
343 it will not depend on changes to the first two jobs.
James E. Blaircdd00072012-06-08 19:17:28 -0700344
345 For more detail on the theory and operation of Zuul's
Clark Boylan00635dc2012-09-19 14:03:08 -0700346 DependentPipelineManager, see: :doc:`gating`.
James E. Blaircdd00072012-06-08 19:17:28 -0700347
348**trigger**
James E. Blairc494d542014-08-06 09:23:52 -0700349 At least one trigger source must be supplied for each pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700350 Triggers are not exclusive -- matching events may be placed in
James E. Blair6c358e72013-07-29 17:06:47 -0700351 multiple pipelines, and they will behave independently in each of
Joshua Heskethfe485c62015-08-11 23:42:34 +1000352 the pipelines they match.
James E. Blaircdd00072012-06-08 19:17:28 -0700353
Joshua Heskethfe485c62015-08-11 23:42:34 +1000354 Triggers are loaded from their connection name. The driver type of
355 the connection will dictate which options are available.
356 See :doc:`triggers`.
James E. Blairc494d542014-08-06 09:23:52 -0700357
James E. Blair11041d22014-05-02 14:49:53 -0700358**require**
359 If this section is present, it established pre-requisites for any
360 kind of item entering the Pipeline. Regardless of how the item is
361 to be enqueued (via any trigger or automatic dependency resolution),
362 the conditions specified here must be met or the item will not be
363 enqueued.
364
Antoine Musso27ab0d52014-10-22 14:20:17 +0200365.. _pipeline-require-approval:
366
James E. Blair5bf78a32015-07-30 18:08:24 +0000367 **approval**
James E. Blair11041d22014-05-02 14:49:53 -0700368 This requires that a certain kind of approval be present for the
369 current patchset of the change (the approval could be added by the
370 event in question). It takes several sub-parameters, all of which
371 are optional and are combined together so that there must be an
372 approval matching all specified requirements.
373
374 *username*
James E. Blairb01ec542016-06-16 09:46:49 -0700375 If present, an approval from this username is required. It is
376 treated as a regular expression.
James E. Blair11041d22014-05-02 14:49:53 -0700377
James E. Blair1fbfceb2014-06-23 14:42:53 -0700378 *email*
James E. Blair11041d22014-05-02 14:49:53 -0700379 If present, an approval with this email address is required. It
James E. Blairb01ec542016-06-16 09:46:49 -0700380 is treated as a regular expression.
James E. Blair11041d22014-05-02 14:49:53 -0700381
James E. Blair1fbfceb2014-06-23 14:42:53 -0700382 *email-filter* (deprecated)
383 A deprecated alternate spelling of *email*. Only one of *email* or
384 *email_filter* should be used.
385
James E. Blair11041d22014-05-02 14:49:53 -0700386 *older-than*
387 If present, the approval must be older than this amount of time
388 to match. Provide a time interval as a number with a suffix of
389 "w" (weeks), "d" (days), "h" (hours), "m" (minutes), "s"
390 (seconds). Example ``48h`` or ``2d``.
391
392 *newer-than*
393 If present, the approval must be newer than this amount of time
394 to match. Same format as "older-than".
395
396 Any other field is interpreted as a review category and value
397 pair. For example ``verified: 1`` would require that the approval
James E. Blair9c17dbf2014-06-23 14:21:58 -0700398 be for a +1 vote in the "Verified" column. The value may either
399 be a single value or a list: ``verified: [1, 2]`` would match
400 either a +1 or +2 vote.
James E. Blair11041d22014-05-02 14:49:53 -0700401
402 **open**
403 A boolean value (``true`` or ``false``) that indicates whether the change
404 must be open or closed in order to be enqueued.
405
Clark Boylana9702ad2014-05-08 17:17:24 -0700406 **current-patchset**
407 A boolean value (``true`` or ``false``) that indicates whether the change
408 must be the current patchset in order to be enqueued.
409
James E. Blair11041d22014-05-02 14:49:53 -0700410 **status**
411 A string value that corresponds with the status of the change
412 reported by the trigger. For example, when using the Gerrit
413 trigger, status values such as ``NEW`` or ``MERGED`` may be useful.
James E. Blair63bb0ef2013-07-29 17:14:51 -0700414
Joshua Hesketh66c8e522014-06-26 15:30:08 +1000415**reject**
416 If this section is present, it establishes pre-requisites that can
417 block an item from being enqueued. It can be considered a negative
418 version of **require**.
419
420 **approval**
421 This takes a list of approvals. If an approval matches the provided
422 criteria the change can not be entered into the pipeline. It follows
423 the same syntax as the :ref:`"require approval" pipeline above
424 <pipeline-require-approval>`.
425
426 Example to reject a change with any negative vote::
427
428 reject:
429 approval:
430 - code-review: [-1, -2]
431
James E. Blair2fa50962013-01-30 21:50:41 -0800432**dequeue-on-new-patchset**
433 Normally, if a new patchset is uploaded to a change that is in a
434 pipeline, the existing entry in the pipeline will be removed (with
435 jobs canceled and any dependent changes that can no longer merge as
436 well. To suppress this behavior (and allow jobs to continue
437 running), set this to ``false``. Default: ``true``.
438
James E. Blair17dd6772015-02-09 14:45:18 -0800439**ignore-dependencies**
440 In any kind of pipeline (dependent or independent), Zuul will
441 attempt to enqueue all dependencies ahead of the current change so
442 that they are tested together (independent pipelines report the
443 results of each change regardless of the results of changes ahead).
444 To ignore dependencies completely in an independent pipeline, set
445 this to ``true``. This option is ignored by dependent pipelines.
446 The default is: ``false``.
447
James E. Blaircdd00072012-06-08 19:17:28 -0700448**success**
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000449 Describes where Zuul should report to if all the jobs complete
450 successfully.
James E. Blaircdd00072012-06-08 19:17:28 -0700451 This section is optional; if it is omitted, Zuul will run jobs and
452 do nothing on success; it will not even report a message to Gerrit.
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000453 If the section is present, the listed reporter plugins will be
454 asked to report on the jobs.
Joshua Heskethfe485c62015-08-11 23:42:34 +1000455 The reporters are listed by their connection name. The options
456 available depend on the driver for the supplied connection.
457 See :doc:`reporters` for more details.
James E. Blaircdd00072012-06-08 19:17:28 -0700458
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400459**failure**
James E. Blaircdd00072012-06-08 19:17:28 -0700460 Uses the same syntax as **success**, but describes what Zuul should
461 do if at least one job fails.
James E. Blairdc253862012-06-13 17:12:42 -0700462
Joshua Heskethb7179772014-01-30 23:30:46 +1100463**merge-failure**
464 Uses the same syntax as **success**, but describes what Zuul should
465 do if it is unable to merge in the patchset. If no merge-failure
466 reporters are listed then the ``failure`` reporters will be used to
467 notify of unsuccessful merges.
468
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400469**start**
James E. Blairdc253862012-06-13 17:12:42 -0700470 Uses the same syntax as **success**, but describes what Zuul should
Clark Boylan00635dc2012-09-19 14:03:08 -0700471 do when a change is added to the pipeline manager. This can be used,
James E. Blairdc253862012-06-13 17:12:42 -0700472 for example, to reset the value of the Verified review category.
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400473
Joshua Hesketh89e829d2015-02-10 16:29:45 +1100474**disabled**
475 Uses the same syntax as **success**, but describes what Zuul should
476 do when a pipeline is disabled.
477 See ``disable-after-consecutive-failures``.
478
479**disable-after-consecutive-failures**
480 If set, a pipeline can enter a ''disabled'' state if too many changes
481 in a row fail. When this value is exceeded the pipeline will stop
482 reporting to any of the ``success``, ``failure`` or ``merge-failure``
483 reporters and instead only report to the ``disabled`` reporters.
484 (No ``start`` reports are made when a pipeline is disabled).
485
James E. Blair64ed6f22013-07-10 14:07:23 -0700486**precedence**
487 Indicates how the build scheduler should prioritize jobs for
488 different pipelines. Each pipeline may have one precedence, jobs
489 for pipelines with a higher precedence will be run before ones with
490 lower. The value should be one of ``high``, ``normal``, or ``low``.
491 Default: ``normal``.
492
Clark Boylanc2d19e42014-01-23 14:08:58 -0800493**window**
494 DependentPipelineManagers only. Zuul can rate limit
495 DependentPipelineManagers in a manner similar to TCP flow control.
496 Jobs are only started for changes in the queue if they sit in the
497 actionable window for the pipeline. The initial length of this window
498 is configurable with this value. The value given should be a positive
499 integer value. A value of ``0`` disables rate limiting on the
500 DependentPipelineManager.
501 Default: ``20``.
502
503**window-floor**
504 DependentPipelineManagers only. This is the minimum value for the
505 window described above. Should be a positive non zero integer value.
506 Default: ``3``.
507
508**window-increase-type**
509 DependentPipelineManagers only. This value describes how the window
510 should grow when changes are successfully merged by zuul. A value of
511 ``linear`` indicates that ``window-increase-factor`` should be added
512 to the previous window value. A value of ``exponential`` indicates
513 that ``window-increase-factor`` should be multiplied against the
514 previous window value and the result will become the window size.
515 Default: ``linear``.
516
517**window-increase-factor**
Clint Adams041ae512015-06-16 20:02:29 -0400518 DependentPipelineManagers only. The value to be added or multiplied
Clark Boylanc2d19e42014-01-23 14:08:58 -0800519 against the previous window value to determine the new window after
520 successful change merges.
521 Default: ``1``.
522
523**window-decrease-type**
524 DependentPipelineManagers only. This value describes how the window
525 should shrink when changes are not able to be merged by Zuul. A value
526 of ``linear`` indicates that ``window-decrease-factor`` should be
527 subtracted from the previous window value. A value of ``exponential``
528 indicates that ``window-decrease-factor`` should be divided against
529 the previous window value and the result will become the window size.
530 Default: ``exponential``.
531
532**window-decrease-factor**
533 DependentPipelineManagers only. The value to be subtracted or divided
534 against the previous window value to determine the new window after
535 unsuccessful change merges.
536 Default: ``2``.
537
Clark Boylan00635dc2012-09-19 14:03:08 -0700538Some example pipeline configurations are included in the sample layout
539file. The first is called a *check* pipeline::
James E. Blaircdd00072012-06-08 19:17:28 -0700540
541 - name: check
Clark Boylan00635dc2012-09-19 14:03:08 -0700542 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700543 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000544 my_gerrit:
545 - event: patchset-created
James E. Blaircdd00072012-06-08 19:17:28 -0700546 success:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000547 my_gerrit:
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000548 verified: 1
James E. Blaircdd00072012-06-08 19:17:28 -0700549 failure:
Thomas Bechtolda8c0dbd2015-12-10 07:16:54 +0100550 my_gerrit:
551 verified: -1
James E. Blaircdd00072012-06-08 19:17:28 -0700552
553This will trigger jobs each time a new patchset (or change) is
554uploaded to Gerrit, and report +/-1 values to Gerrit in the
555``verified`` review category. ::
556
557 - name: gate
Clark Boylan00635dc2012-09-19 14:03:08 -0700558 manager: DependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700559 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000560 my_gerrit:
561 - event: comment-added
562 approval:
563 - approved: 1
James E. Blaircdd00072012-06-08 19:17:28 -0700564 success:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000565 my_gerrit:
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000566 verified: 2
567 submit: true
James E. Blaircdd00072012-06-08 19:17:28 -0700568 failure:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000569 my_gerrit:
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000570 verified: -2
James E. Blaircdd00072012-06-08 19:17:28 -0700571
572This will trigger jobs whenever a reviewer leaves a vote of ``1`` in the
573``approved`` review category in Gerrit (a non-standard category).
574Changes will be tested in such a way as to guarantee that they will be
575merged exactly as tested, though that will happen in parallel by
576creating a virtual queue of dependent changes and performing
577speculative execution of jobs. ::
578
579 - name: post
Clark Boylan00635dc2012-09-19 14:03:08 -0700580 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700581 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000582 my_gerrit:
583 - event: ref-updated
584 ref: ^(?!refs/).*$
James E. Blaircdd00072012-06-08 19:17:28 -0700585
586This will trigger jobs whenever a change is merged to a named branch
587(e.g., ``master``). No output will be reported to Gerrit. This is
588useful for side effects such as creating per-commit tarballs. ::
589
590 - name: silent
Clark Boylan00635dc2012-09-19 14:03:08 -0700591 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700592 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000593 my_gerrit:
594 - event: patchset-created
James E. Blaircdd00072012-06-08 19:17:28 -0700595
596This also triggers jobs when changes are uploaded to Gerrit, but no
597results are reported to Gerrit. This is useful for jobs that are in
Antoine Mussoce333842012-10-16 14:42:35 +0200598development and not yet ready to be presented to developers. ::
599
600 pipelines:
601 - name: post-merge
602 manager: IndependentPipelineManager
603 trigger:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000604 my_gerrit:
605 - event: change-merged
Antoine Mussoce333842012-10-16 14:42:35 +0200606 success:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000607 my_gerrit:
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000608 force-message: True
Antoine Mussoce333842012-10-16 14:42:35 +0200609 failure:
Joshua Heskethfe485c62015-08-11 23:42:34 +1000610 my_gerrit:
Joshua Hesketh1879cf72013-08-19 14:13:15 +1000611 force-message: True
Antoine Mussoce333842012-10-16 14:42:35 +0200612
613The ``change-merged`` events happen when a change has been merged in the git
614repository. The change is thus closed and Gerrit will not accept modifications
615to the review scoring such as ``code-review`` or ``verified``. By using the
616``force-message: True`` parameter, Zuul will pass ``--force-message`` to the
617``gerrit review`` command, thus making sure the message is actually
618sent back to Gerrit regardless of approval scores.
619That kind of pipeline is nice to run regression or performance tests.
620
621.. note::
622 The ``change-merged`` event does not include the commit sha1 which can be
623 hazardous, it would let you report back to Gerrit though. If you were to
Michael Prokop526926a2013-10-24 16:16:57 +0200624 build a tarball for a specific commit, you should consider instead using
Łukasz Jernaś048acb42014-03-02 18:49:41 +0100625 the ``ref-updated`` event which does include the commit sha1 (but lacks the
Antoine Mussoce333842012-10-16 14:42:35 +0200626 Gerrit change number).
James E. Blaircdd00072012-06-08 19:17:28 -0700627
Joshua Hesketh36c3fa52014-01-22 11:40:52 +1100628
629.. _jobs:
630
James E. Blaircdd00072012-06-08 19:17:28 -0700631Jobs
632""""
633
634The jobs section is optional, and can be used to set attributes of
635jobs that are independent of their association with a project. For
636example, if a job should return a customized message on failure, that
637may be specified here. Otherwise, Zuul does not need to be told about
638each job as it builds a list from the project specification.
639
640**name**
641 The name of the job. This field is treated as a regular expression
642 and will be applied to each job that matches.
643
James E. Blairc8a1e052014-02-25 09:29:26 -0800644**queue-name (optional)**
645 Zuul will automatically combine projects that share a job into
646 shared change queues for dependent pipeline managers. In order to
647 report statistics about these queues, it is convenient for them to
648 have names. Zuul can automatically name change queues, however
649 these can grow quite long and are prone to changing as projects in
650 the queue change. If you assign a queue-name to a job, Zuul will
651 use that as the name for the shared change queue that contains that
652 job instead of the automatically generated one. It is an error for
653 a shared change queue to have more than one job with a queue-name if
654 they are not the same.
655
James E. Blaire5a847f2012-07-10 15:29:14 -0700656**failure-message (optional)**
657 The message that should be reported to Gerrit if the job fails.
James E. Blaircdd00072012-06-08 19:17:28 -0700658
James E. Blaire5a847f2012-07-10 15:29:14 -0700659**success-message (optional)**
660 The message that should be reported to Gerrit if the job fails.
James E. Blaircdd00072012-06-08 19:17:28 -0700661
James E. Blair6aea36d2012-12-17 13:03:24 -0800662**failure-pattern (optional)**
663 The URL that should be reported to Gerrit if the job fails.
James E. Blair1f4c2bb2013-04-26 08:40:46 -0700664 Defaults to the build URL or the url_pattern configured in
James E. Blair6aea36d2012-12-17 13:03:24 -0800665 zuul.conf. May be supplied as a string pattern with substitutions
666 as described in url_pattern in :ref:`zuulconf`.
667
668**success-pattern (optional)**
669 The URL that should be reported to Gerrit if the job succeeds.
James E. Blair1f4c2bb2013-04-26 08:40:46 -0700670 Defaults to the build URL or the url_pattern configured in
James E. Blair6aea36d2012-12-17 13:03:24 -0800671 zuul.conf. May be supplied as a string pattern with substitutions
672 as described in url_pattern in :ref:`zuulconf`.
673
James E. Blair222d4982012-07-16 09:31:19 -0700674**hold-following-changes (optional)**
675 This is a boolean that indicates that changes that follow this
Clark Boylan00635dc2012-09-19 14:03:08 -0700676 change in a dependent change pipeline should wait until this job
Paul Belanger174a8272017-03-14 13:20:10 -0400677 succeeds before executing. If this is applied to a very short job
James E. Blair222d4982012-07-16 09:31:19 -0700678 that can predict whether longer jobs will fail early, this can be
Paul Belanger174a8272017-03-14 13:20:10 -0400679 used to reduce the number of jobs that Zuul will execute and
James E. Blair222d4982012-07-16 09:31:19 -0700680 ultimately have to cancel. In that case, a small amount of
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400681 parallelization of jobs is traded for more efficient use of testing
James E. Blair222d4982012-07-16 09:31:19 -0700682 resources. On the other hand, to apply this to a long running job
683 would largely defeat the parallelization of dependent change testing
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400684 that is the main feature of Zuul. Default: ``false``.
James E. Blair222d4982012-07-16 09:31:19 -0700685
Tobias Henkel9a0e1942017-03-20 16:16:02 +0100686**semaphore (optional)**
687 This is a string that names a semaphore that should be observed by this
688 job. The semaphore defines how many jobs which reference that semaphore
689 can be enqueued at a time. This applies across all pipelines in the same
690 tenant. The max value of the semaphore can be specified in the config
691 repositories and defaults to 1.
James E. Blairaf17a972016-02-03 15:07:18 -0800692
James E. Blaire5a847f2012-07-10 15:29:14 -0700693**branch (optional)**
James E. Blaircdd00072012-06-08 19:17:28 -0700694 This job should only be run on matching branches. This field is
695 treated as a regular expression and multiple branches may be
696 listed.
697
James E. Blair70c71582013-03-06 08:50:50 -0800698**files (optional)**
699 This job should only be run if at least one of the files involved in
700 the change (added, deleted, or modified) matches at least one of the
701 file patterns listed here. This field is treated as a regular
702 expression and multiple expressions may be listed.
703
Maru Newby3fe5f852015-01-13 04:22:14 +0000704**skip-if (optional)**
705
706 This job should not be run if all the patterns specified by the
707 optional fields listed below match on their targets. When multiple
708 sets of parameters are provided, this job will be skipped if any set
709 matches. For example: ::
710
711 jobs:
712 - name: check-tempest-dsvm-neutron
713 skip-if:
714 - project: ^openstack/neutron$
715 branch: ^stable/juno$
716 all-files-match-any:
717 - ^neutron/tests/.*$
718 - ^tools/.*$
719 - all-files-match-any:
720 - ^doc/.*$
721 - ^.*\.rst$
722
723 With this configuration, the job would be skipped for a neutron
724 patchset for the stable/juno branch provided that every file in the
725 change matched at least one of the specified file regexes. The job
726 will also be skipped for any patchset that modified only the doc
727 tree or rst files.
728
729 *project* (optional)
730 The regular expression to match against the project of the change.
731
732 *branch* (optional)
733 The regular expression to match against the branch or ref of the
734 change.
735
736 *all-files-match-any* (optional)
737 A list of regular expressions intended to match the files involved
738 in the change. This parameter will be considered matching a
739 change only if all files in a change match at least one of these
740 expressions.
741
742 The pattern for '/COMMIT_MSG' is always matched on and does not
Alexander Evseevdbe6fab2015-11-19 12:46:34 +0300743 have to be included. Exception is merge commits (without modified
744 files), in this case '/COMMIT_MSG' is not matched, and job is not
745 skipped. In case of merge commits it's assumed that list of modified
746 files isn't predictible and CI should be run.
Maru Newby3fe5f852015-01-13 04:22:14 +0000747
Mathieu Gagnéd6d2a642013-06-11 20:59:58 -0400748**voting (optional)**
749 Boolean value (``true`` or ``false``) that indicates whatever
750 a job is voting or not. Default: ``true``.
751
Paul Belanger71d98172016-11-08 10:56:31 -0500752**attempts (optional)**
Paul Belanger174a8272017-03-14 13:20:10 -0400753 Number of attempts zuul will execute a job. Once reached, zuul will report
Paul Belanger71d98172016-11-08 10:56:31 -0500754 RETRY_LIMIT as the job result.
755 Defaults to 3.
756
James E. Blair456f2fb2016-02-09 09:29:33 -0800757**tags (optional)**
758 A list of arbitrary strings which will be associated with the job.
James E. Blair1f4c2bb2013-04-26 08:40:46 -0700759
James E. Blaircdd00072012-06-08 19:17:28 -0700760Here is an example of setting the failure message for jobs that check
761whether a change merges cleanly::
762
763 - name: ^.*-merge$
Jeremy Stanley1c2c3c22015-06-15 21:23:19 +0000764 failure-message: This change or one of its cross-repo dependencies
765 was unable to be automatically merged with the current state of
766 its repository. Please rebase the change and upload a new
767 patchset.
James E. Blaircdd00072012-06-08 19:17:28 -0700768
769Projects
770""""""""
771
Clark Boylan00635dc2012-09-19 14:03:08 -0700772The projects section indicates what jobs should be run in each pipeline
James E. Blaircdd00072012-06-08 19:17:28 -0700773for events associated with each project. It contains a list of
774projects. Here is an example::
775
776 - name: example/project
777 check:
778 - project-merge:
779 - project-unittest
Clark Boylan00635dc2012-09-19 14:03:08 -0700780 - project-pep8
781 - project-pyflakes
James E. Blaircdd00072012-06-08 19:17:28 -0700782 gate:
783 - project-merge:
784 - project-unittest
Clark Boylan00635dc2012-09-19 14:03:08 -0700785 - project-pep8
786 - project-pyflakes
James E. Blaircdd00072012-06-08 19:17:28 -0700787 post:
788 - project-publish
789
790**name**
791 The name of the project (as known by Gerrit).
792
James E. Blair19deff22013-08-25 13:17:35 -0700793**merge-mode (optional)**
794 An optional value that indicates what strategy should be used to
795 merge changes to this project. Supported values are:
796
797 ** merge-resolve **
798 Equivalent to 'git merge -s resolve'. This corresponds closely to
799 what Gerrit performs (using JGit) for a project if the "Merge if
800 necessary" merge mode is selected and "Automatically resolve
801 conflicts" is checked. This is the default.
802
803 ** merge **
804 Equivalent to 'git merge'.
805
806 ** cherry-pick **
807 Equivalent to 'git cherry-pick'.
808
Clark Boylan00635dc2012-09-19 14:03:08 -0700809This is followed by a section for each of the pipelines defined above.
810Pipelines may be omitted if no jobs should run for this project in a
811given pipeline. Within the pipeline section, the jobs that should be
James E. Blaircdd00072012-06-08 19:17:28 -0700812executed are listed. If a job is entered as a dictionary key, then
813jobs contained within that key are only executed if the key job
814succeeds. In the above example, project-unittest, project-pep8, and
Fredrik Medleyf8aec832015-09-28 13:40:20 +0200815project-pyflakes are only executed if project-merge succeeds.
816Furthermore, project-finaltest is executed only if project-unittest,
817project-pep8 and project-pyflakes all succeed. This can help avoid
818running unnecessary jobs while maximizing parallelism. It is also
819useful when distributing results between jobs.
James E. Blaircdd00072012-06-08 19:17:28 -0700820
James E. Blair18c64442014-03-18 10:14:45 -0700821The special job named ``noop`` is internal to Zuul and will always
822return ``SUCCESS`` immediately. This can be useful if you require
823that all changes be processed by a pipeline but a project has no jobs
824that can be run on it.
825
Andreas Jaegerbcfbf932014-09-29 20:21:44 +0200826.. seealso:: The OpenStack Zuul configuration for a comprehensive example: https://git.openstack.org/cgit/openstack-infra/project-config/tree/zuul/layout.yaml
James E. Blaircdd00072012-06-08 19:17:28 -0700827
Antoine Musso80edd5a2013-02-13 15:37:53 +0100828Project Templates
829"""""""""""""""""
830
Michael Prokop526926a2013-10-24 16:16:57 +0200831Whenever you have lot of similar projects (such as plugins for a project) you
Antoine Musso80edd5a2013-02-13 15:37:53 +0100832will most probably want to use the same pipeline configurations. The
833project templates let you define pipelines and job name templates to trigger.
834One can then just apply the template on its project which make it easier to
Michael Prokop526926a2013-10-24 16:16:57 +0200835update several similar projects. As an example::
Antoine Musso80edd5a2013-02-13 15:37:53 +0100836
837 project-templates:
838 # Name of the template
839 - name: plugin-triggering
840 # Definition of pipelines just like for a `project`
841 check:
842 - '{jobprefix}-merge':
843 - '{jobprefix}-pep8'
844 - '{jobprefix}-pyflakes'
845 gate:
846 - '{jobprefix}-merge':
847 - '{jobprefix}-unittest'
848 - '{jobprefix}-pep8'
849 - '{jobprefix}-pyflakes'
850
851In your projects definition, you will then apply the template using the template
852key::
853
854 projects:
855 - name: plugin/foobar
856 template:
857 - name: plugin-triggering
858 jobprefix: plugin-foobar
859
James E. Blairaea6cf62013-12-16 15:38:12 -0800860You can pass several parameters to a template. A ``parameter`` value
861will be used for expansion of ``{parameter}`` in the template
862strings. The parameter ``name`` will be automatically provided and
863will contain the short name of the project, that is the portion of the
864project name after the last ``/`` character.
James E. Blaircdd00072012-06-08 19:17:28 -0700865
James E. Blair3e98c022013-12-16 15:25:38 -0800866Multiple templates can be combined in a project, and the jobs from all
867of those templates will be added to the project. Individual jobs may
868also be added::
869
870 projects:
871 - name: plugin/foobar
872 template:
873 - name: plugin-triggering
874 jobprefix: plugin-foobar
875 - name: plugin-extras
876 jobprefix: plugin-foobar
877 check:
878 - foobar-extra-special-job
879
Steven Dake21ef9ad2014-08-25 23:08:14 -0700880Individual jobs may optionally be added to pipelines (e.g. check,
Atsushi SAKAI5d7e93b2015-07-28 22:15:48 +0900881gate, et cetera) for a project, in addition to those provided by
Steven Dake21ef9ad2014-08-25 23:08:14 -0700882templates.
883
James E. Blair3e98c022013-12-16 15:25:38 -0800884The order of the jobs listed in the project (which only affects the
885order of jobs listed on the report) will be the jobs from each
886template in the order listed, followed by any jobs individually listed
887for the project.
888
889Note that if multiple templates are used for a project and one
890template specifies a job that is also specified in another template,
James E. Blair12a92b12014-03-26 11:54:53 -0700891or specified in the project itself, the configuration defined by
892either the last template or the project itself will take priority.
James E. Blair3e98c022013-12-16 15:25:38 -0800893
Tobias Henkel9a0e1942017-03-20 16:16:02 +0100894
895Semaphores
896""""""""""
897
898When using semaphores the maximum value of each one can be specified in their
899respective config repositories. Unspecified semaphores default to 1::
900
901 - semaphore:
902 name: semaphore-foo
903 max: 5
904 - semaphore:
905 name: semaphore-bar
906 max: 3
907
908
James E. Blaircdd00072012-06-08 19:17:28 -0700909logging.conf
910~~~~~~~~~~~~
911This file is optional. If provided, it should be a standard
912:mod:`logging.config` module configuration file. If not present, Zuul will
913output all log messages of DEBUG level or higher to the console.
914
915Starting Zuul
916-------------
917
918To start Zuul, run **zuul-server**::
919
Antoine Mussob3aa8282013-04-19 15:16:59 +0200920 usage: zuul-server [-h] [-c CONFIG] [-l LAYOUT] [-d] [-t] [--version]
James E. Blaircdd00072012-06-08 19:17:28 -0700921
922 Project gating system.
923
924 optional arguments:
925 -h, --help show this help message and exit
926 -c CONFIG specify the config file
Antoine Mussob3aa8282013-04-19 15:16:59 +0200927 -l LAYOUT specify the layout file
James E. Blaircdd00072012-06-08 19:17:28 -0700928 -d do not run as a daemon
Antoine Mussob3aa8282013-04-19 15:16:59 +0200929 -t validate layout file syntax
930 --version show zuul version
James E. Blaircdd00072012-06-08 19:17:28 -0700931
932You may want to use the ``-d`` argument while you are initially setting
933up Zuul so you can detect any configuration errors quickly. Under
934normal operation, omit ``-d`` and let Zuul run as a daemon.
935
936If you send signal 1 (SIGHUP) to the zuul-server process, Zuul will
937stop executing new jobs, wait until all executing jobs are finished,
Joshua Heskethc4997152016-02-17 21:04:18 +1100938reload its layout.yaml, and resume. Changes to any connections or
939the PID file will be ignored until Zuul is restarted.
Clark Boylanf231fa22013-02-08 12:28:53 -0800940
941If you send a SIGUSR1 to the zuul-server process, Zuul will stop
942executing new jobs, wait until all executing jobs are finished,
943then exit. While waiting to exit Zuul will queue Gerrit events and
944save these events prior to exiting. When Zuul starts again it will
945read these saved events and act on them.
Jeremy Stanley93e05f42013-03-08 17:29:17 +0000946
Michael Prokop526926a2013-10-24 16:16:57 +0200947If you need to abort Zuul and intend to manually requeue changes for
Jeremy Stanley93e05f42013-03-08 17:29:17 +0000948jobs which were running in its pipelines, prior to terminating you can
949use the zuul-changes.py tool script to simplify the process. For
Ramy Asselindda8e6a2015-03-31 14:59:39 -0700950example, this would give you a list of zuul-enqueue commands to requeue
951changes for the gate and check pipelines respectively::
Jeremy Stanley93e05f42013-03-08 17:29:17 +0000952
Ramy Asselindda8e6a2015-03-31 14:59:39 -0700953 ./tools/zuul-changes.py http://zuul.openstack.org/ gate
954 ./tools/zuul-changes.py http://zuul.openstack.org/ check
Clark Boylanfba9b242013-08-20 10:11:17 -0700955
Antoine Musso29eab012014-10-28 21:35:22 +0100956If you send a SIGUSR2 to the zuul-server process, or the forked process
957that runs the Gearman daemon, Zuul will dump a stack trace for each
958running thread into its debug log. It is written under the log bucket
959``zuul.stack_dump``. This is useful for tracking down deadlock or
960otherwise slow threads.
Antoine Mussod0f06262014-06-04 09:54:24 +0200961
962When `yappi <https://code.google.com/p/yappi/>`_ (Yet Another Python
963Profiler) is available, additional functions' and threads' stats are
964emitted as well. The first SIGUSR2 will enable yappi, on the second
965SIGUSR2 it dumps the information collected, resets all yappi state and
966stops profiling. This is to minimize the impact of yappi on a running
967system.