Merge "Correct logic problem with job trees" into feature/zuulv3

This commit is contained in:
Jenkins 2016-12-05 14:14:55 +00:00 committed by Gerrit Code Review
commit 7f661e9edb
2 changed files with 8 additions and 0 deletions

View File

@ -81,6 +81,9 @@
- job:
name: layered-project-foo-test5
- job:
name: project-test6
- project:
name: org/templated-project
templates:

View File

@ -1771,6 +1771,11 @@ class Layout(object):
if variant not in inherited:
frozen_job.inheritFrom(variant)
inherited.add(variant)
if not inherited:
# A change must match at least one defined job variant
# (that is to say that it must match more than just
# the job that is defined in the tree).
continue
if job not in inherited:
# Only update from the job in the tree if it is
# unique, otherwise we might unset an attribute we