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

Side by Side Diff: master/skia_master_scripts/utils.py

Issue 12380071: Adding trybots for Periodic and PerCommit Housekeeper (Closed) Base URL: http://skia.googlecode.com/svn/buildbot/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « master/skia_master_scripts/housekeeping_periodic_factory.py ('k') | master/slaves.cfg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 5
6 """Miscellaneous utilities needed by the Skia buildbot master.""" 6 """Miscellaneous utilities needed by the Skia buildbot master."""
7 7
8 8
9 import httplib2 9 import httplib2
10 import re 10 import re
11 11
12 12
13 # requires Google APIs client library for Python; see 13 # requires Google APIs client library for Python; see
14 # https://code.google.com/p/google-api-python-client/wiki/Installation 14 # https://code.google.com/p/google-api-python-client/wiki/Installation
15 from apiclient.discovery import build 15 from apiclient.discovery import build
16 from buildbot.scheduler import AnyBranchScheduler 16 from buildbot.scheduler import AnyBranchScheduler
17 from buildbot.schedulers import timed 17 from buildbot.schedulers import timed
18 from buildbot.schedulers.filter import ChangeFilter 18 from buildbot.schedulers.filter import ChangeFilter
19 from buildbot.util import NotABranch 19 from buildbot.util import NotABranch
20 from config_private import TRY_SVN_BASEURL 20 from config_private import TRY_SVN_BASEURL
21 from master import master_config 21 from master import master_config
22 from master.builders_pools import BuildersPools 22 from master.builders_pools import BuildersPools
23 from master import try_job_svn 23 from master import try_job_svn
24 from oauth2client.client import SignedJwtAssertionCredentials 24 from oauth2client.client import SignedJwtAssertionCredentials
25 from skia_master_scripts import android_factory 25 from skia_master_scripts import android_factory
26 from skia_master_scripts import chromeos_factory 26 from skia_master_scripts import chromeos_factory
27 from skia_master_scripts import factory as skia_factory 27 from skia_master_scripts import factory as skia_factory
28 from skia_master_scripts import housekeeping_percommit_factory, \
29 housekeeping_periodic_factory
28 from skia_master_scripts import ios_factory 30 from skia_master_scripts import ios_factory
29 31
30 32
31 TRYBOT_NAME_SUFFIX = '_Trybot' 33 TRYBOT_NAME_SUFFIX = '_Trybot'
32 34
33 35
34 class SkiaChangeFilter(ChangeFilter): 36 class SkiaChangeFilter(ChangeFilter):
35 """Skia specific subclass of ChangeFilter.""" 37 """Skia specific subclass of ChangeFilter."""
36 38
37 def __init__(self, builders, **kwargs): 39 def __init__(self, builders, **kwargs):
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 def _MakeBuilderAndMaybeTrybotSet(do_trybots=True, **kwargs): 434 def _MakeBuilderAndMaybeTrybotSet(do_trybots=True, **kwargs):
433 _MakeBuilderSet(is_trybot=False, **kwargs) 435 _MakeBuilderSet(is_trybot=False, **kwargs)
434 if do_trybots: 436 if do_trybots:
435 _MakeBuilderSet(is_trybot=True, **kwargs) 437 _MakeBuilderSet(is_trybot=True, **kwargs)
436 438
437 439
438 def MakeBuilderSet(**kwargs): 440 def MakeBuilderSet(**kwargs):
439 _MakeBuilderAndMaybeTrybotSet(factory_type=skia_factory.SkiaFactory, **kwargs) 441 _MakeBuilderAndMaybeTrybotSet(factory_type=skia_factory.SkiaFactory, **kwargs)
440 442
441 443
444 def MakeHousekeeperBuilderSet(helper, do_trybots, do_upload_results):
445 B = helper.Builder
446 F = helper.Factory
447
448 builder_factory_scheduler = [
449 # The Percommit housekeeper
450 ('Skia_PerCommit_House_Keeping',
451 housekeeping_percommit_factory.HouseKeepingPerCommitFactory,
452 'skia_rel'),
453 # The Periodic housekeeper
454 ('Skia_Periodic_House_Keeping',
455 housekeeping_periodic_factory.HouseKeepingPeriodicFactory,
456 'skia_periodic'),
457 ]
458 if do_trybots:
459 # Add the corresponding trybot builders to the above list.
460 builder_factory_scheduler.extend([
461 (builder + TRYBOT_NAME_SUFFIX, factory, 'skia_try')
462 for (builder, factory, _scheduler) in builder_factory_scheduler])
463
464 for (builder_name, factory, scheduler) in builder_factory_scheduler:
465 B(builder_name, 'f_%s' % builder_name, scheduler=scheduler)
466 F('f_%s' % builder_name,
467 factory(
468 do_upload_results=do_upload_results,
469 target_platform=skia_factory.TARGET_PLATFORM_LINUX,
470 builder_name=builder_name,
471 do_patch_step=(scheduler == 'skia_try'),
472 ).Build())
473
474
442 def MakeAndroidBuilderSet(extra_branches=None, **kwargs): 475 def MakeAndroidBuilderSet(extra_branches=None, **kwargs):
443 if not extra_branches: 476 if not extra_branches:
444 extra_branches = [] 477 extra_branches = []
445 extra_branches.append('android') 478 extra_branches.append('android')
446 _MakeBuilderAndMaybeTrybotSet(factory_type=android_factory.AndroidFactory, 479 _MakeBuilderAndMaybeTrybotSet(factory_type=android_factory.AndroidFactory,
447 extra_branches=extra_branches, 480 extra_branches=extra_branches,
448 **kwargs) 481 **kwargs)
449 482
450 483
451 def MakeChromeOSBuilderSet(**kwargs): 484 def MakeChromeOSBuilderSet(**kwargs):
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 # request is associated with a change but the revisions match (#5 above). 528 # request is associated with a change but the revisions match (#5 above).
496 if req1.source.changes and not req2.source.changes: 529 if req1.source.changes and not req2.source.changes:
497 return False 530 return False
498 if not req1.source.changes and req2.source.changes: 531 if not req1.source.changes and req2.source.changes:
499 return False 532 return False
500 if not (req1.source.changes and req2.source.changes): 533 if not (req1.source.changes and req2.source.changes):
501 if req1.source.revision != req2.source.revision: 534 if req1.source.revision != req2.source.revision:
502 return False 535 return False
503 536
504 return True 537 return True
OLDNEW
« no previous file with comments | « master/skia_master_scripts/housekeeping_periodic_factory.py ('k') | master/slaves.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698