Merge "Read config from .zuul.yaml or zuul.yaml" into feature/zuulv3

This commit is contained in:
Jenkins 2017-07-07 17:56:12 +00:00 committed by Gerrit Code Review
commit bd619b6883
1 changed files with 6 additions and 5 deletions

View File

@ -1134,7 +1134,7 @@ class TenantParser(object):
job = merger.getFiles(
project.source.connection.connection_name,
project.name, branch,
files=['.zuul.yaml'])
files=['zuul.yaml', '.zuul.yaml'])
job.source_context = model.SourceContext(
project, branch, '', False)
jobs.append(job)
@ -1324,15 +1324,16 @@ class ConfigLoader(object):
def _loadDynamicProjectData(self, config, project, files, trusted):
if trusted:
branches = ['master']
fn = 'zuul.yaml'
else:
branches = project.source.getProjectBranches(project)
fn = '.zuul.yaml'
for branch in branches:
incdata = None
data = files.getFile(project.source.connection.connection_name,
project.name, branch, fn)
for fn in ['zuul.yaml', '.zuul.yaml']:
data = files.getFile(project.source.connection.connection_name,
project.name, branch, fn)
if data:
break
if data:
source_context = model.SourceContext(project, branch,
fn, trusted)