Add a Zuul trigger
This adds the ability for a pipelite to have multiple triggers.
This also adds a "Zuul" trigger which is used to generate trigger
events based on internal actions Zuul has taken.
It supports two event types:
* parent-change-enqueued: This can be used so that other pipelines
can enqueue children of parents that are enqueued in a different
pipeline. Specifically, this lets OpenStack enqueue changes in
check when their parents are enqueued in gate (which may be
necessary because of our clean check rules).
This could be used to replace the internal logic that enqueues
children in dependent pipelines (moving that into explicit
configuration instead).
One can also imagine a future 'change-enqueued' event so that a
pipeline could react directly to a change in another.
* project-change-merged: This can be used to trigger changes on all
open changes for a project when a change is merged to that project.
Specifically, this lets us perform light-weight merge checks on all
open changes whenever a change is merged.
Change-Id: I2a67699dbed92a6b9c143a77795cb126f1f4dd57
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 1b9ce64..4c3f6d3 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -372,7 +372,7 @@
DependentPipelineManager, see: :doc:`gating`.
**trigger**
- Exactly one trigger source must be supplied for each pipeline.
+ At least one trigger source must be supplied for each pipeline.
Triggers are not exclusive -- matching events may be placed in
multiple pipelines, and they will behave independently in each of
the pipelines they match. You may select from the following:
@@ -458,6 +458,31 @@
supported, not the symbolic names. Example: ``0 0 * * *`` runs
at midnight.
+ **zuul**
+ This trigger supplies events generated internally by Zuul.
+ Multiple events may be listed.
+
+ *event*
+ The event name. Currently supported:
+
+ *project-change-merged* when Zuul merges a change to a project,
+ it generates this event for every open change in the project.
+
+ *parent-change-enqueued* when Zuul enqueues a change into any
+ pipeline, it generates this event for every child of that
+ change.
+
+ *pipeline*
+ Only available for ``parent-change-enqueued`` events. This is the
+ name of the pipeline in which the parent change was enqueued.
+
+ *require-approval*
+ This may be used for any event. It requires that a certain kind
+ of approval be present for the current patchset of the change (the
+ approval could be added by the event in question). It follows the
+ same syntax as the "approval" pipeline requirement below.
+
+
**require**
If this section is present, it established pre-requisites for any
kind of item entering the Pipeline. Regardless of how the item is