blob: c4485bf5d628420913014b16ff600395599b499f [file] [log] [blame]
James E. Blaircdd00072012-06-08 19:17:28 -07001:title: Triggers
2
3Triggers
4========
5
6The process of merging a change starts with proposing a change to be
James E. Blair63bb0ef2013-07-29 17:14:51 -07007merged. Primarily, Zuul supports Gerrit as a triggering system, as
8well as a facility for triggering jobs based on a timer.
James E. Blaircdd00072012-06-08 19:17:28 -07009Zuul's design is modular, so alternate triggering and reporting
James E. Blair63bb0ef2013-07-29 17:14:51 -070010systems can be supported.
James E. Blaircdd00072012-06-08 19:17:28 -070011
12Gerrit
13------
14
15Zuul works with standard versions of Gerrit by invoking the ``gerrit
16stream-events`` command over an SSH connection. It also reports back
17to Gerrit using SSH.
18
19Gerrit Configuration
20~~~~~~~~~~~~~~~~~~~~
21
22Zuul will need access to a Gerrit user. Consider naming the user
23*Jenkins* so that developers see that feedback from changes is from
24Jenkins (Zuul attempts to stay out of the way of developers, most
25shouldn't even need to know it's there).
26
27Create an SSH keypair for Zuul to use if there isn't one already, and
28create a Gerrit user with that key::
29
30 cat ~/id_rsa.pub | ssh -p29418 gerrit.example.com gerrit create-account --ssh-key - --full-name Jenkins jenkins
31
32Give that user whatever permissions will be needed on the projects you
33want Zuul to gate. For instance, you may want to grant ``Verified
34+/-1`` and ``Submit`` to the user. Additional categories or values may
35be added to Gerrit. Zuul is very flexible and can take advantage of
36those.
James E. Blair172c0762012-10-02 15:35:54 -070037
James E. Blair63bb0ef2013-07-29 17:14:51 -070038Timer
39-----
40
41A simple timer trigger is available as well. It supports triggering
42jobs in a pipeline based on cron-style time instructions.