blob: 2899fdda2ed3d4c3a1889f97cd30a180790df109 [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**
12 Credentials for Gerrit and Jenkins, locations of the other config files
13**layout.yaml**
Clark Boylan00635dc2012-09-19 14:03:08 -070014 Project and pipeline configuration -- what Zuul does
James E. Blaircdd00072012-06-08 19:17:28 -070015**logging.conf**
16 Python logging config
17
18Examples of each of the three files can be found in the etc/ directory
19of the source distribution.
20
James E. Blair6aea36d2012-12-17 13:03:24 -080021.. _zuulconf:
22
James E. Blaircdd00072012-06-08 19:17:28 -070023zuul.conf
24~~~~~~~~~
25
26Zuul will look for ``/etc/zuul/zuul.conf`` or ``~/zuul.conf`` to
27bootstrap its configuration. Alternately, you may specify ``-c
28/path/to/zuul.conf`` on the command line.
29
30Gerrit and Jenkins credentials are each described in a section of
31zuul.conf. The location of the other two configuration files (as well
32as the location of the PID file when running Zuul as a server) are
33specified in a third section.
34
Clark Boylan9b670902012-09-28 13:47:56 -070035The three sections of this config and their options are documented below.
36You can also find an example zuul.conf file in the git
37`repository
K Jonathan Harker97e457e2013-02-26 13:29:38 -080038<https://github.com/openstack-infra/zuul/blob/master/etc/zuul.conf-sample>`_
Clark Boylan9b670902012-09-28 13:47:56 -070039
40jenkins
41"""""""
42
43**server**
44 URL for the root of the Jenkins HTTP server.
45 ``server=https://jenkins.example.com``
46
47**user**
48 User to authenticate against Jenkins with.
49 ``user=jenkins``
50
51**apikey**
52 Jenkins API Key credentials for the above user.
53 ``apikey=1234567890abcdef1234567890abcdef``
54
55gerrit
56""""""
57
58**server**
59 FQDN of Gerrit server.
60 ``server=review.example.com``
61
Antoine Musso27475012012-11-26 09:53:01 +010062**baseurl**
63 Optional: path to Gerrit web interface. Defaults to ``https://<value
64 of server>/``. ``baseurl=https://review.example.com/review_site/``
65
Clark Boylan9b670902012-09-28 13:47:56 -070066**user**
67 User name to use when logging into above server via ssh.
68 ``user=jenkins``
69
70**sshkey**
71 Path to SSH key to use when logging into above server.
72 ``sshkey=/home/jenkins/.ssh/id_rsa``
73
74zuul
75""""
76
77**layout_config**
78 Path to layout config file.
79 ``layout_config=/etc/zuul/layout.yaml``
80
81**log_config**
82 Path to log config file.
83 ``log_config=/etc/zuul/logging.yaml``
84
85**pidfile**
86 Path to PID lock file.
87 ``pidfile=/var/run/zuul/zuul.pid``
88
89**state_dir**
90 Path to directory that Zuul should save state to.
91 ``state_dir=/var/lib/zuul``
92
93**git_dir**
94 Directory that Zuul should clone local git repositories to.
95 ``git_dir=/var/lib/zuul/git``
96
Paul Belangerb67aba12013-05-13 19:22:14 -040097**git_user_email**
98 Optional: Value to pass to `git config user.email`.
99 ``git_user_email=zuul@example.com``
100
101**git_user_name**
102 Optional: Value to pass to `git config user.name`.
103 ``git_user_name=zuul``
104
Clark Boylan9b670902012-09-28 13:47:56 -0700105**push_change_refs**
106 Boolean value (``true`` or ``false``) that determines if Zuul should
107 push change refs to the git origin server for the git repositories in
108 git_dir.
109 ``push_change_refs=true``
110
James E. Blair0ac6c012013-04-26 09:04:23 -0700111**report_times**
112 Boolean value (``true`` or ``false``) that determines if Zuul should
113 include elapsed times for each job in the textual report.
114 ``report_times=true``
115
Clark Boylan9b670902012-09-28 13:47:56 -0700116**status_url**
117 URL that will be posted in Zuul comments made to Gerrit changes when
118 beginning Jenkins jobs for a change.
119 ``status_url=https://jenkins.example.com/zuul/status``
120
121**url_pattern**
122 If you are storing build logs external to Jenkins and wish to link to
123 those logs when Zuul makes comments on Gerrit changes for completed
124 jobs this setting configures what the URLs for those links should be.
125 ``http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}``
126
James E. Blaircdd00072012-06-08 19:17:28 -0700127layout.yaml
128~~~~~~~~~~~
129
Clark Boylan00635dc2012-09-19 14:03:08 -0700130This is the main configuration file for Zuul, where all of the pipelines
James E. Blaircdd00072012-06-08 19:17:28 -0700131and projects are defined, what tests should be run, and what actions
Clark Boylan00635dc2012-09-19 14:03:08 -0700132Zuul should perform. There are three sections: pipelines, jobs, and
James E. Blaircdd00072012-06-08 19:17:28 -0700133projects.
134
James E. Blaire5a847f2012-07-10 15:29:14 -0700135.. _includes:
136
137Includes
138""""""""
139
140Custom functions to be used in Zuul's configuration may be provided
141using the ``includes`` directive. It accepts a list of files to
142include, and currently supports one type of inclusion, a python file::
143
144 includes:
145 - python-file: local_functions.py
146
147**python-file**
148 The path to a python file. The file will be loaded and objects that
149 it defines will be placed in a special environment which can be
150 referenced in the Zuul configuration. Currently only the
151 parameter-function attribute of a Job uses this feature.
152
Clark Boylan00635dc2012-09-19 14:03:08 -0700153Pipelines
154"""""""""
James E. Blaircdd00072012-06-08 19:17:28 -0700155
Clark Boylan00635dc2012-09-19 14:03:08 -0700156Zuul can have any number of independent pipelines. Whenever a matching
157Gerrit event is found for a pipeline, that event is added to the
158pipeline, and the jobs specified for that pipeline are run. When all
159jobs specified for the pipeline that were triggered by an event are
160completed, Zuul reports back to Gerrit the results.
James E. Blaircdd00072012-06-08 19:17:28 -0700161
Clark Boylan00635dc2012-09-19 14:03:08 -0700162There are no pre-defined pipelines in Zuul, rather you can define
163whatever pipelines you need in the layout file. This is a very flexible
164system that can accommodate many kinds of workflows.
James E. Blaircdd00072012-06-08 19:17:28 -0700165
Clark Boylan00635dc2012-09-19 14:03:08 -0700166Here is a quick example of a pipeline definition followed by an
James E. Blaircdd00072012-06-08 19:17:28 -0700167explanation of each of the parameters::
168
169 - name: check
Clark Boylan00635dc2012-09-19 14:03:08 -0700170 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700171 trigger:
172 - event: patchset-created
173 success:
174 verified: 1
175 failure:
176 verified: -1
177
178**name**
179 This is used later in the project definition to indicate what jobs
Clark Boylan00635dc2012-09-19 14:03:08 -0700180 should be run for events in the pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700181
James E. Blair8dbd56a2012-12-22 10:55:10 -0800182**description**
183 This is an optional field that may be used to provide a textual
184 description of the pipeline.
185
James E. Blair56370192013-01-14 15:47:28 -0800186**success-message**
187 An optional field that supplies the introductory text in message
188 reported back to Gerrit when all the voting builds are successful.
189 Defaults to "Build successful."
190
191**failure-message**
192 An optional field that supplies the introductory text in message
193 reported back to Gerrit when at least one voting build fails.
194 Defaults to "Build failed."
195
James E. Blaircdd00072012-06-08 19:17:28 -0700196**manager**
Clark Boylan00635dc2012-09-19 14:03:08 -0700197 There are currently two schemes for managing pipelines:
James E. Blaircdd00072012-06-08 19:17:28 -0700198
Clark Boylan00635dc2012-09-19 14:03:08 -0700199 *IndependentPipelineManager*
200 Every event in this pipeline should be treated as independent of
201 other events in the pipeline. This is appropriate when the order of
202 events in the pipeline doesn't matter because the results of the
203 actions this pipeline performs can not affect other events in the
204 pipeline. For example, when a change is first uploaded for review,
James E. Blaircdd00072012-06-08 19:17:28 -0700205 you may want to run tests on that change to provide early feedback
206 to reviewers. At the end of the tests, the change is not going to
207 be merged, so it is safe to run these tests in parallel without
Clark Boylan00635dc2012-09-19 14:03:08 -0700208 regard to any other changes in the pipeline. They are independent.
James E. Blaircdd00072012-06-08 19:17:28 -0700209
Clark Boylan00635dc2012-09-19 14:03:08 -0700210 Another type of pipeline that is independent is a post-merge
211 pipeline. In that case, the changes have already merged, so the
212 results can not affect any other events in the pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700213
Clark Boylan00635dc2012-09-19 14:03:08 -0700214 *DependentPipelineManager*
215 The dependent pipeline manager is designed for gating. It ensures
James E. Blaircdd00072012-06-08 19:17:28 -0700216 that every change is tested exactly as it is going to be merged
217 into the repository. An ideal gating system would test one change
218 at a time, applied to the tip of the repository, and only if that
219 change passed tests would it be merged. Then the next change in
220 line would be tested the same way. In order to achieve parallel
Clark Boylan00635dc2012-09-19 14:03:08 -0700221 testing of changes, the dependent pipeline manager performs
James E. Blaircdd00072012-06-08 19:17:28 -0700222 speculative execution on changes. It orders changes based on
Clark Boylan00635dc2012-09-19 14:03:08 -0700223 their entry into the pipeline. It begins testing all changes in
224 parallel, assuming that each change ahead in the pipeline will pass
James E. Blaircdd00072012-06-08 19:17:28 -0700225 its tests. If they all succeed, all the changes can be tested and
Clark Boylan00635dc2012-09-19 14:03:08 -0700226 merged in parallel. If a change near the front of the pipeline
227 fails its tests, each change behind it ignores whatever tests have
228 been completed and are tested again without the change in front.
229 This way gate tests may run in parallel but still be tested
230 correctly, exactly as they will appear in the repository when
231 merged.
James E. Blaircdd00072012-06-08 19:17:28 -0700232
Clark Boylan00635dc2012-09-19 14:03:08 -0700233 One important characteristic of the DependentPipelineManager is that
James E. Blaircdd00072012-06-08 19:17:28 -0700234 it analyzes the jobs that are triggered by different projects, and
235 if those projects have jobs in common, it treats those projects as
236 related, and they share a single virtual queue of changes. Thus,
237 if there is a job that performs integration testing on two
238 projects, those two projects will automatically share a virtual
239 change queue. If a third project does not invoke that job, it
Clark Boylan00635dc2012-09-19 14:03:08 -0700240 will be part of a separate virtual change queue, and changes to
241 it will not depend on changes to the first two jobs.
James E. Blaircdd00072012-06-08 19:17:28 -0700242
243 For more detail on the theory and operation of Zuul's
Clark Boylan00635dc2012-09-19 14:03:08 -0700244 DependentPipelineManager, see: :doc:`gating`.
James E. Blaircdd00072012-06-08 19:17:28 -0700245
246**trigger**
Clark Boylan00635dc2012-09-19 14:03:08 -0700247 This describes what Gerrit events should be placed in the pipeline.
James E. Blaircdd00072012-06-08 19:17:28 -0700248 Triggers are not exclusive -- matching events may be placed in
Clark Boylan00635dc2012-09-19 14:03:08 -0700249 multiple pipelines, and they will behave independently in each of the
250 pipelines they match. Multiple triggers may be listed. Further
James E. Blaircdd00072012-06-08 19:17:28 -0700251 parameters describe the kind of events that match:
252
253 *event*
254 The event name from gerrit. Examples: ``patchset-created``,
255 ``comment-added``, ``ref-updated``. This field is treated as a
256 regular expression.
257
258 *branch*
259 The branch associated with the event. Example: ``master``. This
260 field is treated as a regular expression, and multiple branches may
261 be listed.
262
263 *ref*
264 On ref-updated events, the branch parameter is not used, instead the
265 ref is provided. Currently Gerrit has the somewhat idiosyncratic
266 behavior of specifying bare refs for branch names (e.g., ``master``),
267 but full ref names for other kinds of refs (e.g., ``refs/tags/foo``).
268 Zuul matches what you put here exactly against what Gerrit
269 provides. This field is treated as a regular expression, and
270 multiple refs may be listed.
271
272 *approval*
273 This is only used for ``comment-added`` events. It only matches if
274 the event has a matching approval associated with it. Example:
275 ``code-review: 2`` matches a ``+2`` vote on the code review category.
276 Multiple approvals may be listed.
277
Antoine Mussob4e809e2012-12-06 16:58:06 +0100278 *email_filter*
279 This is used for any event. It takes a regex applied on the performer
Antoine Musso5f110422012-12-18 23:22:13 +0100280 email, i.e Gerrit account email address. If you want to specify
281 several email filters, you must use a YAML list. Make sure to use non
282 greedy matchers and to escapes dots!
283 Example: ``email_filter: ^.*?@example\.org$``.
Antoine Mussob4e809e2012-12-06 16:58:06 +0100284
Clark Boylanb9bcb402012-06-29 17:44:05 -0700285 *comment_filter*
286 This is only used for ``comment-added`` events. It accepts a list of
287 regexes that are searched for in the comment string. If any of these
288 regexes matches a portion of the comment string the trigger is
289 matched. ``comment_filter: retrigger`` will match when comments
290 containing 'retrigger' somewhere in the comment text are added to a
291 change.
292
James E. Blair2fa50962013-01-30 21:50:41 -0800293**dequeue-on-new-patchset**
294 Normally, if a new patchset is uploaded to a change that is in a
295 pipeline, the existing entry in the pipeline will be removed (with
296 jobs canceled and any dependent changes that can no longer merge as
297 well. To suppress this behavior (and allow jobs to continue
298 running), set this to ``false``. Default: ``true``.
299
James E. Blaircdd00072012-06-08 19:17:28 -0700300**success**
301 Describes what Zuul should do if all the jobs complete successfully.
302 This section is optional; if it is omitted, Zuul will run jobs and
303 do nothing on success; it will not even report a message to Gerrit.
304 If the section is present, it will leave a message on the Gerrit
305 review. Each additional argument is assumed to be an argument to
306 ``gerrit review``, with the boolean value of ``true`` simply
307 indicating that the argument should be present without following it
308 with a value. For example, ``verified: 1`` becomes ``gerrit
309 review --verified 1`` and ``submit: true`` becomes ``gerrit review
310 --submit``.
311
312**failure**
313 Uses the same syntax as **success**, but describes what Zuul should
314 do if at least one job fails.
James E. Blairdc253862012-06-13 17:12:42 -0700315
316**start**
317 Uses the same syntax as **success**, but describes what Zuul should
Clark Boylan00635dc2012-09-19 14:03:08 -0700318 do when a change is added to the pipeline manager. This can be used,
James E. Blairdc253862012-06-13 17:12:42 -0700319 for example, to reset the value of the Verified review category.
James E. Blaircdd00072012-06-08 19:17:28 -0700320
Clark Boylan00635dc2012-09-19 14:03:08 -0700321Some example pipeline configurations are included in the sample layout
322file. The first is called a *check* pipeline::
James E. Blaircdd00072012-06-08 19:17:28 -0700323
324 - name: check
Clark Boylan00635dc2012-09-19 14:03:08 -0700325 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700326 trigger:
327 - event: patchset-created
328 success:
329 verified: 1
330 failure:
331 verified: -1
332
333This will trigger jobs each time a new patchset (or change) is
334uploaded to Gerrit, and report +/-1 values to Gerrit in the
335``verified`` review category. ::
336
337 - name: gate
Clark Boylan00635dc2012-09-19 14:03:08 -0700338 manager: DependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700339 trigger:
340 - event: comment-added
341 approval:
342 - approved: 1
343 success:
344 verified: 2
345 submit: true
346 failure:
347 verified: -2
348
349This will trigger jobs whenever a reviewer leaves a vote of ``1`` in the
350``approved`` review category in Gerrit (a non-standard category).
351Changes will be tested in such a way as to guarantee that they will be
352merged exactly as tested, though that will happen in parallel by
353creating a virtual queue of dependent changes and performing
354speculative execution of jobs. ::
355
356 - name: post
Clark Boylan00635dc2012-09-19 14:03:08 -0700357 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700358 trigger:
359 - event: ref-updated
360 ref: ^(?!refs/).*$
361
362This will trigger jobs whenever a change is merged to a named branch
363(e.g., ``master``). No output will be reported to Gerrit. This is
364useful for side effects such as creating per-commit tarballs. ::
365
366 - name: silent
Clark Boylan00635dc2012-09-19 14:03:08 -0700367 manager: IndependentPipelineManager
James E. Blaircdd00072012-06-08 19:17:28 -0700368 trigger:
369 - event: patchset-created
370
371This also triggers jobs when changes are uploaded to Gerrit, but no
372results are reported to Gerrit. This is useful for jobs that are in
Antoine Mussoce333842012-10-16 14:42:35 +0200373development and not yet ready to be presented to developers. ::
374
375 pipelines:
376 - name: post-merge
377 manager: IndependentPipelineManager
378 trigger:
379 - event: change-merged
380 success:
381 force-message: True
382 failure:
383 force-message: True
384
385The ``change-merged`` events happen when a change has been merged in the git
386repository. The change is thus closed and Gerrit will not accept modifications
387to the review scoring such as ``code-review`` or ``verified``. By using the
388``force-message: True`` parameter, Zuul will pass ``--force-message`` to the
389``gerrit review`` command, thus making sure the message is actually
390sent back to Gerrit regardless of approval scores.
391That kind of pipeline is nice to run regression or performance tests.
392
393.. note::
394 The ``change-merged`` event does not include the commit sha1 which can be
395 hazardous, it would let you report back to Gerrit though. If you were to
396 build a tarball for a specific commit, you should consider insteading using
397 the ``ref-updated`` event which does include the commit sha1 (but lack the
398 Gerrit change number).
James E. Blaircdd00072012-06-08 19:17:28 -0700399
400Jobs
401""""
402
403The jobs section is optional, and can be used to set attributes of
404jobs that are independent of their association with a project. For
405example, if a job should return a customized message on failure, that
406may be specified here. Otherwise, Zuul does not need to be told about
407each job as it builds a list from the project specification.
408
409**name**
410 The name of the job. This field is treated as a regular expression
411 and will be applied to each job that matches.
412
James E. Blaire5a847f2012-07-10 15:29:14 -0700413**failure-message (optional)**
414 The message that should be reported to Gerrit if the job fails.
James E. Blaircdd00072012-06-08 19:17:28 -0700415
James E. Blaire5a847f2012-07-10 15:29:14 -0700416**success-message (optional)**
417 The message that should be reported to Gerrit if the job fails.
James E. Blaircdd00072012-06-08 19:17:28 -0700418
James E. Blair6aea36d2012-12-17 13:03:24 -0800419**failure-pattern (optional)**
420 The URL that should be reported to Gerrit if the job fails.
421 Defaults to the Jenkins build URL or the url_pattern configured in
422 zuul.conf. May be supplied as a string pattern with substitutions
423 as described in url_pattern in :ref:`zuulconf`.
424
425**success-pattern (optional)**
426 The URL that should be reported to Gerrit if the job succeeds.
427 Defaults to the Jenkins build URL or the url_pattern configured in
428 zuul.conf. May be supplied as a string pattern with substitutions
429 as described in url_pattern in :ref:`zuulconf`.
430
James E. Blair222d4982012-07-16 09:31:19 -0700431**hold-following-changes (optional)**
432 This is a boolean that indicates that changes that follow this
Clark Boylan00635dc2012-09-19 14:03:08 -0700433 change in a dependent change pipeline should wait until this job
James E. Blair222d4982012-07-16 09:31:19 -0700434 succeeds before launching. If this is applied to a very short job
435 that can predict whether longer jobs will fail early, this can be
436 used to reduce the number of jobs that Zuul will launch and
437 ultimately have to cancel. In that case, a small amount of
438 paralellization of jobs is traded for more efficient use of testing
439 resources. On the other hand, to apply this to a long running job
440 would largely defeat the parallelization of dependent change testing
441 that is the main feature of Zuul. The default is False.
442
James E. Blaire5a847f2012-07-10 15:29:14 -0700443**branch (optional)**
James E. Blaircdd00072012-06-08 19:17:28 -0700444 This job should only be run on matching branches. This field is
445 treated as a regular expression and multiple branches may be
446 listed.
447
James E. Blair70c71582013-03-06 08:50:50 -0800448**files (optional)**
449 This job should only be run if at least one of the files involved in
450 the change (added, deleted, or modified) matches at least one of the
451 file patterns listed here. This field is treated as a regular
452 expression and multiple expressions may be listed.
453
James E. Blaire5a847f2012-07-10 15:29:14 -0700454**parameter-function (optional)**
455 Specifies a function that should be applied to the parameters before
456 the job is launched. The function should be defined in a python file
457 included with the :ref:`includes` directive. The function
458 should have the following signature:
459
460 .. function:: parameters(change, parameters)
461
462 Manipulate the parameters passed to a job before a build is
463 launched. The ``parameters`` dictionary will already contain the
464 standard Zuul job parameters, and is expected to be modified
465 in-place.
466
467 :param change: the current change
468 :type change: zuul.model.Change
469 :param parameters: parameters to be passed to the job
470 :type parameters: dict
471
James E. Blaircdd00072012-06-08 19:17:28 -0700472Here is an example of setting the failure message for jobs that check
473whether a change merges cleanly::
474
475 - name: ^.*-merge$
476 failure-message: This change was unable to be automatically merged
477 with the current state of the repository. Please rebase your
478 change and upload a new patchset.
479
480Projects
481""""""""
482
Clark Boylan00635dc2012-09-19 14:03:08 -0700483The projects section indicates what jobs should be run in each pipeline
James E. Blaircdd00072012-06-08 19:17:28 -0700484for events associated with each project. It contains a list of
485projects. Here is an example::
486
487 - name: example/project
488 check:
489 - project-merge:
490 - project-unittest
Clark Boylan00635dc2012-09-19 14:03:08 -0700491 - project-pep8
492 - project-pyflakes
James E. Blaircdd00072012-06-08 19:17:28 -0700493 gate:
494 - project-merge:
495 - project-unittest
Clark Boylan00635dc2012-09-19 14:03:08 -0700496 - project-pep8
497 - project-pyflakes
James E. Blaircdd00072012-06-08 19:17:28 -0700498 post:
499 - project-publish
500
501**name**
502 The name of the project (as known by Gerrit).
503
Clark Boylan00635dc2012-09-19 14:03:08 -0700504This is followed by a section for each of the pipelines defined above.
505Pipelines may be omitted if no jobs should run for this project in a
506given pipeline. Within the pipeline section, the jobs that should be
James E. Blaircdd00072012-06-08 19:17:28 -0700507executed are listed. If a job is entered as a dictionary key, then
508jobs contained within that key are only executed if the key job
509succeeds. In the above example, project-unittest, project-pep8, and
510project-pyflakes are only executed if project-merge succeeds. This
511can help avoid running unnecessary jobs.
512
Paul Belangerffef9e42013-02-11 22:15:18 -0500513.. seealso:: The OpenStack Zuul configuration for a comprehensive example: https://github.com/openstack-infra/config/blob/master/modules/openstack_project/files/zuul/layout.yaml
James E. Blaircdd00072012-06-08 19:17:28 -0700514
Antoine Musso80edd5a2013-02-13 15:37:53 +0100515Project Templates
516"""""""""""""""""
517
518Whenever you have lot of similiar projects (such as plugins for a project) you
519will most probably want to use the same pipeline configurations. The
520project templates let you define pipelines and job name templates to trigger.
521One can then just apply the template on its project which make it easier to
522update several similiar projects. As an example::
523
524 project-templates:
525 # Name of the template
526 - name: plugin-triggering
527 # Definition of pipelines just like for a `project`
528 check:
529 - '{jobprefix}-merge':
530 - '{jobprefix}-pep8'
531 - '{jobprefix}-pyflakes'
532 gate:
533 - '{jobprefix}-merge':
534 - '{jobprefix}-unittest'
535 - '{jobprefix}-pep8'
536 - '{jobprefix}-pyflakes'
537
538In your projects definition, you will then apply the template using the template
539key::
540
541 projects:
542 - name: plugin/foobar
543 template:
544 - name: plugin-triggering
545 jobprefix: plugin-foobar
546
547You can pass several parameters to a template. A ``parameter`` value will be
548used for expansion of ``{parameter}`` in the template strings.
James E. Blaircdd00072012-06-08 19:17:28 -0700549
550logging.conf
551~~~~~~~~~~~~
552This file is optional. If provided, it should be a standard
553:mod:`logging.config` module configuration file. If not present, Zuul will
554output all log messages of DEBUG level or higher to the console.
555
556Starting Zuul
557-------------
558
559To start Zuul, run **zuul-server**::
560
Antoine Mussob3aa8282013-04-19 15:16:59 +0200561 usage: zuul-server [-h] [-c CONFIG] [-l LAYOUT] [-d] [-t] [--version]
James E. Blaircdd00072012-06-08 19:17:28 -0700562
563 Project gating system.
564
565 optional arguments:
566 -h, --help show this help message and exit
567 -c CONFIG specify the config file
Antoine Mussob3aa8282013-04-19 15:16:59 +0200568 -l LAYOUT specify the layout file
James E. Blaircdd00072012-06-08 19:17:28 -0700569 -d do not run as a daemon
Antoine Mussob3aa8282013-04-19 15:16:59 +0200570 -t validate layout file syntax
571 --version show zuul version
James E. Blaircdd00072012-06-08 19:17:28 -0700572
573You may want to use the ``-d`` argument while you are initially setting
574up Zuul so you can detect any configuration errors quickly. Under
575normal operation, omit ``-d`` and let Zuul run as a daemon.
576
577If you send signal 1 (SIGHUP) to the zuul-server process, Zuul will
578stop executing new jobs, wait until all executing jobs are finished,
579reload its configuration, and resume. Any values in any of the
580configuration files may be changed, except the location of Zuul's PID
581file (a change to that will be ignored until Zuul is restarted).
Clark Boylanf231fa22013-02-08 12:28:53 -0800582
583If you send a SIGUSR1 to the zuul-server process, Zuul will stop
584executing new jobs, wait until all executing jobs are finished,
585then exit. While waiting to exit Zuul will queue Gerrit events and
586save these events prior to exiting. When Zuul starts again it will
587read these saved events and act on them.
Jeremy Stanley93e05f42013-03-08 17:29:17 +0000588
589If you need to abort zuul and intend to manually requeue changes for
590jobs which were running in its pipelines, prior to terminating you can
591use the zuul-changes.py tool script to simplify the process. For
592example, this would give you a list of Gerrit commands to reverify or
593recheck changes for the gate and check pipelines respectively::
594
595 ./tools/zuul-changes.py --review-host=review.openstack.org \
596 http://zuul.openstack.org/ gate 'reverify no bug'
597 ./tools/zuul-changes.py --review-host=review.openstack.org \
598 http://zuul.openstack.org/ check 'recheck no bug'