| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import ast | 5 import ast |
| 6 import os | 6 import os |
| 7 | 7 |
| 8 from buildbot.changes.filter import ChangeFilter | 8 from buildbot.changes.filter import ChangeFilter |
| 9 from buildbot.schedulers.basic import SingleBranchScheduler | 9 from buildbot.schedulers.basic import SingleBranchScheduler |
| 10 from buildbot.schedulers.timed import Nightly | 10 from buildbot.schedulers.timed import Nightly |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 def _Populate(BuildmasterConfig, builders, active_master_cls): | 33 def _Populate(BuildmasterConfig, builders, active_master_cls): |
| 34 m_annotator = annotator_factory.AnnotatorFactory(active_master_cls) | 34 m_annotator = annotator_factory.AnnotatorFactory(active_master_cls) |
| 35 | 35 |
| 36 c = BuildmasterConfig | 36 c = BuildmasterConfig |
| 37 c['logCompressionLimit'] = False | 37 c['logCompressionLimit'] = False |
| 38 c['projectName'] = active_master_cls.project_name | 38 c['projectName'] = active_master_cls.project_name |
| 39 c['projectURL'] = Master.project_url | 39 c['projectURL'] = Master.project_url |
| 40 c['buildbotURL'] = active_master_cls.buildbot_url | 40 c['buildbotURL'] = active_master_cls.buildbot_url |
| 41 | 41 |
| 42 # This sets c['db_url'] to the database connect string in found in | 42 # This sets c['db_url'] to the database connect string in found in |
| 43 # the .dbconfig in the master directory, if it exists. If this is | 43 # the .dbconfig in the master directory, if it exists. |
| 44 # a production host, it must exist. | 44 chromium_utils.DatabaseSetup(c) |
| 45 chromium_utils.DatabaseSetup( | |
| 46 c, | |
| 47 require_dbconfig=active_master_cls.is_production_host) | |
| 48 | 45 |
| 49 c['builders'] = _ComputeBuilders(builders, m_annotator, active_master_cls) | 46 c['builders'] = _ComputeBuilders(builders, m_annotator, active_master_cls) |
| 50 | 47 |
| 51 c['schedulers'] = _ComputeSchedulers(builders) | 48 c['schedulers'] = _ComputeSchedulers(builders) |
| 52 | 49 |
| 53 c['change_source'], tag_comparator = _ComputeChangeSourceAndTagComparator( | 50 c['change_source'], tag_comparator = _ComputeChangeSourceAndTagComparator( |
| 54 builders) | 51 builders) |
| 55 | 52 |
| 56 # The 'slaves' list defines the set of allowable buildslaves. List all the | 53 # The 'slaves' list defines the set of allowable buildslaves. List all the |
| 57 # slaves registered to a builder. Remove dupes. | 54 # slaves registered to a builder. Remove dupes. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 pollInterval=300, | 234 pollInterval=300, |
| 238 revlinktmpl=rev_link_template)) | 235 revlinktmpl=rev_link_template)) |
| 239 | 236 |
| 240 # We have to set the tag_comparator to something, but if we have multiple | 237 # We have to set the tag_comparator to something, but if we have multiple |
| 241 # repos, the tag_comparator will not work properly (it's meaningless). | 238 # repos, the tag_comparator will not work properly (it's meaningless). |
| 242 # It's not clear if there's a good answer to this. | 239 # It's not clear if there's a good answer to this. |
| 243 if change_source: | 240 if change_source: |
| 244 tag_comparator = change_source[0].comparator | 241 tag_comparator = change_source[0].comparator |
| 245 | 242 |
| 246 return change_source, tag_comparator | 243 return change_source, tag_comparator |
| OLD | NEW |