[OpenStack-Infra] ZUUL query: instead of layout.yaml, parameter-function can be use to control job flow ?
James E. Blair
corvus at inaugust.com
Thu Oct 6 22:46:57 UTC 2016
Bhavik Bavishi <bhavikdbavishi at gmail.com> writes:
> In our project we have started using ZUUL. Our project is stack based
> and more of branch oriented, in other words in stack almost all
> components (each component is separate git repo) should follow same
> workflow but for few are exceptions and this also changes for from
> In such case we are trying to find alternate way to control job flow
> instead of 'layout.yaml', so can 'parameter-function' help here to
> control the flow? like for given branch and component do trigger the
> job, else skip/exclude ?
> any help appreciated, thanks.
The parameter function is used to alter the run-time parameters for a
job that Zuul has already decided to run. I don't believe it can be
used to decide not to run a job.
You can control what jobs run on what branches for given projects using
the "jobs" section in layout.yaml.
In our setup in OpenStack, our job names are based on git repos (so we
have "gate-nova-python27" and "gate-keystone-python27" as job names).
That means we can write:
To indicate that the python27 job for nova should only run on the master
The branch specifier can be a regular expression:
Which says: run the nova python27 job on any branch except
stable/liberty or stable/mitaka.
Even the job name can be a regex:
(Run all python27 jobs on any branch except stable/liberty or
The inability to match by project (only implicitly by including the
project name in the job name) is a limitation. We are going to fix that
in Zuul v3 and make this sort of thing much easier to specify. However,
the ability to use regular expressions in those fields does give a lot
of flexibility, and with a little bit of planning, very sophisticated
conditionals are possible today.
I hope that helps, and I'm happy to help with more detailed plans if
that isn't sufficient.
More information about the OpenStack-Infra