Merge "Send interface_ip in the node description" into feature/zuulv3
diff --git a/requirements.txt b/requirements.txt
index c7e059a..974b77f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,7 +9,7 @@
python-daemon>=2.0.4,<2.1.0
extras
statsd>=1.0.0,<3.0
-voluptuous>=0.7
+voluptuous>=0.10.2
gear>=0.5.7,<1.0.0
apscheduler>=3.0
PrettyTable>=0.6,<0.8
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 5e88ee7..a8d643b 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -582,7 +582,7 @@
'email': str,
'older-than': str,
'newer-than': str,
- }, extra=True)
+ }, extra=vs.ALLOW_EXTRA)
require = {'approval': to_list(approval),
'open': bool,
@@ -1051,14 +1051,16 @@
def _loadDynamicProjectData(self, config, source, project, files,
config_repo):
- for branch in source.getProjectBranches(project):
- data = None
- if config_repo:
- fn = 'zuul.yaml'
- data = files.getFile(project.name, branch, fn)
- if not data:
- fn = '.zuul.yaml'
- data = files.getFile(project.name, branch, fn)
+ if config_repo:
+ branches = ['master']
+ fn = 'zuul.yaml'
+ else:
+ branches = source.getProjectBranches(project)
+ fn = '.zuul.yaml'
+
+ for branch in branches:
+ incdata = None
+ data = files.getFile(project.name, branch, fn)
if data:
source_context = model.SourceContext(project, branch,
fn, config_repo)
@@ -1069,10 +1071,12 @@
incdata = TenantParser._parseProjectRepoLayout(
data, source_context)
else:
- incdata = project.unparsed_branch_config.get(branch)
- if not incdata:
- continue
- config.extend(incdata)
+ if config_repo:
+ incdata = project.unparsed_config
+ else:
+ incdata = project.unparsed_branch_config.get(branch)
+ if incdata:
+ config.extend(incdata)
def createDynamicLayout(self, tenant, files, include_config_repos=False):
if include_config_repos:
@@ -1101,6 +1105,12 @@
# configuration changes.
layout.semaphores = tenant.layout.semaphores
+ for config_nodeset in config.nodesets:
+ layout.addNodeSet(NodeSetParser.fromYaml(layout, config_nodeset))
+
+ for config_secret in config.secrets:
+ layout.addSecret(SecretParser.fromYaml(layout, config_secret))
+
for config_job in config.jobs:
layout.addJob(JobParser.fromYaml(tenant, layout, config_job))
diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py
index e18daa9..f8d47d2 100644
--- a/zuul/driver/gerrit/gerritconnection.py
+++ b/zuul/driver/gerrit/gerritconnection.py
@@ -819,5 +819,5 @@
def getSchema():
- gerrit_connection = v.Any(str, v.Schema({}, extra=True))
+ gerrit_connection = v.Any(str, v.Schema(dict))
return gerrit_connection
diff --git a/zuul/driver/gerrit/gerritreporter.py b/zuul/driver/gerrit/gerritreporter.py
index d132d65..0ade355 100644
--- a/zuul/driver/gerrit/gerritreporter.py
+++ b/zuul/driver/gerrit/gerritreporter.py
@@ -48,5 +48,5 @@
def getSchema():
- gerrit_reporter = v.Any(str, v.Schema({}, extra=True))
+ gerrit_reporter = v.Any(str, v.Schema(dict))
return gerrit_reporter
diff --git a/zuul/driver/gerrit/gerrittrigger.py b/zuul/driver/gerrit/gerrittrigger.py
index c678bce..70c65fd 100644
--- a/zuul/driver/gerrit/gerrittrigger.py
+++ b/zuul/driver/gerrit/gerrittrigger.py
@@ -82,14 +82,14 @@
def getSchema():
def toList(x):
return v.Any([x], x)
- variable_dict = v.Schema({}, extra=True)
+ variable_dict = v.Schema(dict)
approval = v.Schema({'username': str,
'email-filter': str,
'email': str,
'older-than': str,
'newer-than': str,
- }, extra=True)
+ }, extra=v.ALLOW_EXTRA)
gerrit_trigger = {
v.Required('event'):
diff --git a/zuul/driver/git/gitconnection.py b/zuul/driver/git/gitconnection.py
index 9c8d658..67f195c 100644
--- a/zuul/driver/git/gitconnection.py
+++ b/zuul/driver/git/gitconnection.py
@@ -59,5 +59,5 @@
def getSchema():
- git_connection = v.Any(str, v.Schema({}, extra=True))
+ git_connection = v.Any(str, v.Schema(dict))
return git_connection
diff --git a/zuul/driver/smtp/smtpconnection.py b/zuul/driver/smtp/smtpconnection.py
index 6338cd5..56ca240 100644
--- a/zuul/driver/smtp/smtpconnection.py
+++ b/zuul/driver/smtp/smtpconnection.py
@@ -58,5 +58,5 @@
def getSchema():
- smtp_connection = v.Any(str, v.Schema({}, extra=True))
+ smtp_connection = v.Any(str, v.Schema(dict))
return smtp_connection
diff --git a/zuul/driver/sql/sqlconnection.py b/zuul/driver/sql/sqlconnection.py
index 31bc13a..4b1b1a2 100644
--- a/zuul/driver/sql/sqlconnection.py
+++ b/zuul/driver/sql/sqlconnection.py
@@ -101,5 +101,5 @@
def getSchema():
- sql_connection = v.Any(str, v.Schema({}, extra=True))
+ sql_connection = v.Any(str, v.Schema(dict))
return sql_connection
diff --git a/zuul/driver/zuul/zuultrigger.py b/zuul/driver/zuul/zuultrigger.py
index bb7c04e..c0c2fb3 100644
--- a/zuul/driver/zuul/zuultrigger.py
+++ b/zuul/driver/zuul/zuultrigger.py
@@ -63,7 +63,7 @@
'email': str,
'older-than': str,
'newer-than': str,
- }, extra=True)
+ }, extra=v.ALLOW_EXTRA)
zuul_trigger = {
v.Required('event'):