blob: e98ab6ea2bf1371f22f328f71c123d396b3adb85 [file] [log] [blame]
Monty Taylor82dfd412016-07-29 12:01:28 -07001Zuul Internals
2==============
3
4While most people should not need to understand the details of Zuul's internal
5data model, understanding the data model is essential for people writing
6code for Zuul, and might be interesting to advanced users. The model is
7defined in `zuul/model.py`_.
8
9.. _zuul/model.py: http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/model.py
10
11Data Model
12----------
13
14It all starts with the :py:class:`~zuul.model.Pipeline`. A Pipeline is the
15basic organizational structure that everything else hangs off.
16
17.. autoclass:: zuul.model.Pipeline
18
19Pipelines have a configured
Monty Taylorc75478c2016-07-29 12:04:21 -070020:py:class:`~zuul.manager.PipelineManager` which controlls how
Monty Taylor82dfd412016-07-29 12:01:28 -070021the :py:class:`Change <zuul.model.Changeish>` objects are enqueued and
22processed.
23
24There are currently two,
25:py:class:`~zuul.manager.dependent.DependentPipelineManager` and
26:py:class:`~zuul.manager.independent.IndependentPipelineManager`
27
Monty Taylorc75478c2016-07-29 12:04:21 -070028.. autoclass:: zuul.manager.PipelineManager
Monty Taylor82dfd412016-07-29 12:01:28 -070029.. autoclass:: zuul.manager.dependent.DependentPipelineManager
30.. autoclass:: zuul.manager.independent.IndependentPipelineManager
31
32A :py:class:`~zuul.model.Pipeline` has one or more
33:py:class:`~zuul.model.ChangeQueue` objects.
34
35.. autoclass:: zuul.model.ChangeQueue
36
37A :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
40encapsulate the dependencies between one or more :py:class:`~zuul.model.Job`
41objects.
42
43.. autoclass:: zuul.model.Job
44.. autoclass:: zuul.model.JobTree
45.. autoclass:: zuul.model.Build
46
47The :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
53As the Changes are processed, each :py:class:`~zuul.model.Build` is put into
54a :py:class:`~zuul.model.BuildSet`
55
56.. autoclass:: zuul.model.BuildSet
57
58Changes
59~~~~~~~
60
61.. autoclass:: zuul.model.Changeish
62.. autoclass:: zuul.model.Change
63.. autoclass:: zuul.model.Ref
64
65Filters
66~~~~~~~
67
68.. autoclass:: zuul.model.ChangeishFilter
69.. autoclass:: zuul.model.EventFilter
70
71
72Tenants
73~~~~~~~
74
75An abide is a collection of tenants.
76
77.. autoclass:: zuul.model.UnparsedAbideConfig
78.. autoclass:: zuul.model.UnparsedTenantConfig
79
80Other 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
James E. Blaire7b99a02016-08-05 14:27:34 -070088
89
90Testing
91-------
92
93Zuul provides an extensive framework for performing functional testing
94on the system from end-to-end with major external components replaced
95by fakes for ease of use and speed.
96
97Test classes that subclass :py:class:`~tests.base.ZuulTestCase` have
98access to a number of attributes useful for manipulating or inspecting
99the environment being simulated in the test:
100
101.. autoclass:: tests.base.ZuulTestCase
102 :members:
103
104.. autoclass:: tests.base.FakeGerritConnection
105 :members:
106 :inherited-members:
107
108.. autoclass:: tests.base.FakeGearmanServer
109 :members:
110
111.. autoclass:: tests.base.RecordingLaunchServer
112 :members:
113
114.. autoclass:: tests.base.FakeBuild
115 :members:
116
117.. autoclass:: tests.base.BuildHistory
118 :members: