Monty Taylor | 82dfd41 | 2016-07-29 12:01:28 -0700 | [diff] [blame] | 1 | Zuul Internals |
| 2 | ============== |
| 3 | |
| 4 | While most people should not need to understand the details of Zuul's internal |
| 5 | data model, understanding the data model is essential for people writing |
| 6 | code for Zuul, and might be interesting to advanced users. The model is |
| 7 | defined in `zuul/model.py`_. |
| 8 | |
| 9 | .. _zuul/model.py: http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/model.py |
| 10 | |
| 11 | Data Model |
| 12 | ---------- |
| 13 | |
| 14 | It all starts with the :py:class:`~zuul.model.Pipeline`. A Pipeline is the |
| 15 | basic organizational structure that everything else hangs off. |
| 16 | |
| 17 | .. autoclass:: zuul.model.Pipeline |
| 18 | |
| 19 | Pipelines have a configured |
Monty Taylor | c75478c | 2016-07-29 12:04:21 -0700 | [diff] [blame] | 20 | :py:class:`~zuul.manager.PipelineManager` which controlls how |
Monty Taylor | 82dfd41 | 2016-07-29 12:01:28 -0700 | [diff] [blame] | 21 | the :py:class:`Change <zuul.model.Changeish>` objects are enqueued and |
| 22 | processed. |
| 23 | |
| 24 | There are currently two, |
| 25 | :py:class:`~zuul.manager.dependent.DependentPipelineManager` and |
| 26 | :py:class:`~zuul.manager.independent.IndependentPipelineManager` |
| 27 | |
Monty Taylor | c75478c | 2016-07-29 12:04:21 -0700 | [diff] [blame] | 28 | .. autoclass:: zuul.manager.PipelineManager |
Monty Taylor | 82dfd41 | 2016-07-29 12:01:28 -0700 | [diff] [blame] | 29 | .. autoclass:: zuul.manager.dependent.DependentPipelineManager |
| 30 | .. autoclass:: zuul.manager.independent.IndependentPipelineManager |
| 31 | |
| 32 | A :py:class:`~zuul.model.Pipeline` has one or more |
| 33 | :py:class:`~zuul.model.ChangeQueue` objects. |
| 34 | |
| 35 | .. autoclass:: zuul.model.ChangeQueue |
| 36 | |
| 37 | A :py:class:`~zuul.model.Job` represents the definition of what to do. A |
| 38 | :py:class:`~zuul.model.Build` represents a single run of a |
| 39 | :py:class:`~zuul.model.Job`. A :py:class:`~zuul.model.JobTree` is used to |
| 40 | encapsulate the dependencies between one or more :py:class:`~zuul.model.Job` |
| 41 | objects. |
| 42 | |
| 43 | .. autoclass:: zuul.model.Job |
| 44 | .. autoclass:: zuul.model.JobTree |
| 45 | .. autoclass:: zuul.model.Build |
| 46 | |
| 47 | The :py:class:`~zuul.manager.base.PipelineManager` enqueues each |
| 48 | :py:class:`Change <zuul.model.Changeish>` into the |
| 49 | :py:class:`~zuul.model.ChangeQueue` in a :py:class:`~zuul.model.QueueItem`. |
| 50 | |
| 51 | .. autoclass:: zuul.model.QueueItem |
| 52 | |
| 53 | As the Changes are processed, each :py:class:`~zuul.model.Build` is put into |
| 54 | a :py:class:`~zuul.model.BuildSet` |
| 55 | |
| 56 | .. autoclass:: zuul.model.BuildSet |
| 57 | |
| 58 | Changes |
| 59 | ~~~~~~~ |
| 60 | |
| 61 | .. autoclass:: zuul.model.Changeish |
| 62 | .. autoclass:: zuul.model.Change |
| 63 | .. autoclass:: zuul.model.Ref |
| 64 | |
| 65 | Filters |
| 66 | ~~~~~~~ |
| 67 | |
| 68 | .. autoclass:: zuul.model.ChangeishFilter |
| 69 | .. autoclass:: zuul.model.EventFilter |
| 70 | |
| 71 | |
| 72 | Tenants |
| 73 | ~~~~~~~ |
| 74 | |
| 75 | An abide is a collection of tenants. |
| 76 | |
| 77 | .. autoclass:: zuul.model.UnparsedAbideConfig |
| 78 | .. autoclass:: zuul.model.UnparsedTenantConfig |
| 79 | |
| 80 | Other Global Objects |
| 81 | ~~~~~~~~~~~~~~~~~~~~ |
| 82 | |
| 83 | .. autoclass:: zuul.model.Project |
| 84 | .. autoclass:: zuul.model.Layout |
| 85 | .. autoclass:: zuul.model.RepoFiles |
| 86 | .. autoclass:: zuul.model.Worker |
| 87 | .. autoclass:: zuul.model.TriggerEvent |