Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: scripts/master/master_gen.py

Issue 1400073002: Teach builders.pyl about RepoPoller. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Follow convention for {}.get() Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/master_gen.py
diff --git a/scripts/master/master_gen.py b/scripts/master/master_gen.py
index 2a3f417ac8441a8eea20106f36800bb4d610b8a6..1e624f67435ba24350832b48864e1548b4ae15de 100644
--- a/scripts/master/master_gen.py
+++ b/scripts/master/master_gen.py
@@ -16,6 +16,7 @@ from common import chromium_utils
from master import gitiles_poller
from master import master_utils
+from master import repo_poller
from master import slaves_list
from master.factory import annotator_factory
@@ -138,7 +139,7 @@ def _ComputeSchedulers(builders):
scheduler_type = scheduler_values['type']
builder_names = scheduler_to_builders[scheduler_name]
- if scheduler_type == 'git_poller':
+ if scheduler_type in ('git_poller', 'repo_poller'):
schedulers.append(SingleBranchScheduler(
name=scheduler_name,
branch='master',
@@ -168,6 +169,20 @@ def _ComputeChangeSourceAndTagComparator(builders):
if v['type'] == 'git_poller')):
change_source.append(gitiles_poller.GitilesPoller(url))
+ for scheduler_config in builders['schedulers'].values():
+ if scheduler_config['type'] != 'repo_poller':
+ continue
+
+ rev_link_template = scheduler_config.get('rev_link_template')
+ branch = scheduler_config.get('branch')
+ branches = [branch] if branch is not None else None
+ change_source.append(repo_poller.RepoPoller(
+ repo_url=scheduler_config['repo_url'],
+ manifest='manifest',
+ repo_branches=branches,
+ pollInterval=300,
+ revlinktmpl=rev_link_template))
+
# We have to set the tag_comparator to something, but if we have multiple
# repos, the tag_comparator will not work properly (it's meaningless).
# It's not clear if there's a good answer to this.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698