diff --git a/zuul/configloader.py b/zuul/configloader.py
index 8d5f14f..a8d643b 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -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))
 
