[openstack-dev] [all] Zuul job definitions and the branches attribute

Clark Boylan cboylan at sapwetik.org
Fri Apr 13 17:20:47 UTC 2018


Hello everyone,

Nova recently discovered that if you use the job.branches attribute in job definitions the results may not be as expected, particularly if you are porting jobs from openstack-zuul-jobs into your project repos.

The problem is the openstack-zuul-jobs project is "branchless", it only has a master branch. This means for jobs defined in that repo to restrict running jobs against certain branches it used the job.branches attribute. When ported to "branched" repos like Nova this job.branches attribute has a slightly different behavior and it applies the config on the current branch to all branches matching job.branches.

In the Nova case this meant the stable/queens job definition was being applied to the master job definition for the job with the same name. Instead the job.branches attribute should be dropped and you should use the per branch job definition to control branch specific attributes. If you want to stop running a job on a branch delete the job's definition from that branch.

TL;DR if you have job definitions that have a branches attribute like Nova did [0], you should consider removing that and use the per branch definitions to control where and when jobs run.

[0] https://git.openstack.org/cgit/openstack/nova/tree/.zuul.yaml?id=cb6c8ca1a7a5abc4d0079e285f877c18c49acaf2#n99

If you have any questions feel free to reach out to the infra team either here or on IRC.

Clark



More information about the OpenStack-dev mailing list