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 |
James E. Blair | 63bb0ef | 2013-07-29 17:14:51 -0700 | [diff] [blame] | 7 | merged. Primarily, Zuul supports Gerrit as a triggering system, as |
| 8 | well as a facility for triggering jobs based on a timer. |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 9 | Zuul's design is modular, so alternate triggering and reporting |
James E. Blair | 63bb0ef | 2013-07-29 17:14:51 -0700 | [diff] [blame] | 10 | systems can be supported. |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 11 | |
| 12 | Gerrit |
| 13 | ------ |
| 14 | |
| 15 | Zuul works with standard versions of Gerrit by invoking the ``gerrit |
| 16 | stream-events`` command over an SSH connection. It also reports back |
| 17 | to Gerrit using SSH. |
| 18 | |
| 19 | Gerrit Configuration |
| 20 | ~~~~~~~~~~~~~~~~~~~~ |
| 21 | |
| 22 | Zuul will need access to a Gerrit user. Consider naming the user |
| 23 | *Jenkins* so that developers see that feedback from changes is from |
| 24 | Jenkins (Zuul attempts to stay out of the way of developers, most |
| 25 | shouldn't even need to know it's there). |
| 26 | |
| 27 | Create an SSH keypair for Zuul to use if there isn't one already, and |
| 28 | create 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 | |
| 32 | Give that user whatever permissions will be needed on the projects you |
| 33 | want Zuul to gate. For instance, you may want to grant ``Verified |
| 34 | +/-1`` and ``Submit`` to the user. Additional categories or values may |
| 35 | be added to Gerrit. Zuul is very flexible and can take advantage of |
| 36 | those. |
James E. Blair | 172c076 | 2012-10-02 15:35:54 -0700 | [diff] [blame] | 37 | |
James E. Blair | 63bb0ef | 2013-07-29 17:14:51 -0700 | [diff] [blame] | 38 | Timer |
| 39 | ----- |
| 40 | |
| 41 | A simple timer trigger is available as well. It supports triggering |
| 42 | jobs in a pipeline based on cron-style time instructions. |