Le 19/11/2015 18:51, Brian Gerstle a écrit :
Nice work!
Is this at all related to upstream/downstream Jenkins jobs?
The Zuul system does not rely at all on Jenkins upstream/downstream. One can think of Jenkins as a huge collections of independent shell scripts that are waiting to be executed with appropriate parameters.
OpenStack has a spec to get rid of Jenkins entirely and instead have Zuul create an Ansible play book to run on a machine. But really that is another topic.
To elaborate a bit more:
Gerrit does support dependencies between changes, but only in the same repository and branch. You can see that in the Gerrit web interface, and Gerrit will refuse to merge a change for which the parent is not merged yet.
Zuul does the same but independently from Gerrit. It is merely filling the gap of Gerrit lacks of cross repositories dependencies.
When a change is voted +2, it is enqueued in 'gate-and-submit'. Zuul immediately verify whether the dependencies are either merged or ahead in the queue, else it will reject the change and report back in Gerrit.
So if you have change A and change B depending on A. You +2 A then B and the queue is:
A <-- B (depend on A)
A is processed (no dependency) For B, Zuul find the dependency A ahead and thus it is processed.
If A fails the tests, B tests are automatically cancelled and the change dequeued. Zuul knows B depends on A.
Assuming all changes are merged by Zuul (via CR+2), Zuul dependency comes on top of Gerrit and nicely enforce dependencies.