James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame^] | 1 | :title: Triggers |
| 2 | |
| 3 | Triggers |
| 4 | ======== |
| 5 | |
| 6 | The process of merging a change starts with proposing a change to be |
| 7 | merged. Currently Zuul only supports Gerrit as a triggering system. |
| 8 | Zuul's design is modular, so alternate triggering and reporting |
| 9 | systems can be supported. However, Gerrit has a particularly robust |
| 10 | data model, and Zuul does make some assumptions that include that data |
| 11 | model. Nonetheless, patches to support alternate systems are welcome. |
| 12 | |
| 13 | Gerrit |
| 14 | ------ |
| 15 | |
| 16 | Zuul works with standard versions of Gerrit by invoking the ``gerrit |
| 17 | stream-events`` command over an SSH connection. It also reports back |
| 18 | to Gerrit using SSH. |
| 19 | |
| 20 | Gerrit Configuration |
| 21 | ~~~~~~~~~~~~~~~~~~~~ |
| 22 | |
| 23 | Zuul will need access to a Gerrit user. Consider naming the user |
| 24 | *Jenkins* so that developers see that feedback from changes is from |
| 25 | Jenkins (Zuul attempts to stay out of the way of developers, most |
| 26 | shouldn't even need to know it's there). |
| 27 | |
| 28 | Create an SSH keypair for Zuul to use if there isn't one already, and |
| 29 | create a Gerrit user with that key:: |
| 30 | |
| 31 | cat ~/id_rsa.pub | ssh -p29418 gerrit.example.com gerrit create-account --ssh-key - --full-name Jenkins jenkins |
| 32 | |
| 33 | Give that user whatever permissions will be needed on the projects you |
| 34 | want Zuul to gate. For instance, you may want to grant ``Verified |
| 35 | +/-1`` and ``Submit`` to the user. Additional categories or values may |
| 36 | be added to Gerrit. Zuul is very flexible and can take advantage of |
| 37 | those. |