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

Side by Side Diff: scripts/master/buildbucket/__init__.py

Issue 968053003: BuildBucket-based build triggering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 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 | « no previous file | scripts/master/buildbucket/trigger.py » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 """buildbucket module implements buildbucket-buildbot integration. 5 """buildbucket module implements buildbucket-buildbot integration.
6 6
7 The main entry point is buildbucket.setup() that accepts master configuration 7 The main entry point is buildbucket.setup() that accepts master configuration
8 dict with other buildbucket parameters and configures master to run builds 8 dict with other buildbucket parameters and configures master to run builds
9 scheduled on buildbucket service. 9 scheduled on buildbucket service.
10 10
11 Example: 11 Example:
12 buildbucket.setup( 12 buildbucket.setup(
13 c, # Configuration object. 13 c, # Configuration object.
14 ActiveMaster, 14 ActiveMaster,
15 buckets=['qo'], 15 buckets=['qo'],
16 ) 16 )
17 17
18 """ 18 """
19 19
20 import functools 20 import functools
21 import os 21 import os
22 22
23 from .common import Error 23 from .common import Error
24 from .integration import BuildBucketIntegrator 24 from .integration import BuildBucketIntegrator
25 from .poller import BuildBucketPoller 25 from .poller import BuildBucketPoller
26 from .status import BuildBucketStatus 26 from .status import BuildBucketStatus
27 from . import client 27 from . import client
28 from . import trigger
ghost stip (do not use) 2015/03/04 23:07:30 have we always used relative imports here? seems w
nodir 2015/03/04 23:52:09 I understand why using absolute imports is better:
28 29
29 30
30 def setup( 31 def setup(
31 config, active_master, buckets, poll_interval=10, 32 config, active_master, buckets, poll_interval=10,
32 buildbucket_hostname=None, max_lease_count=None, verbose=None, 33 buildbucket_hostname=None, max_lease_count=None, verbose=None,
33 dry_run=None): 34 dry_run=None):
34 """Configures a master to lease, schedule and update builds on buildbucket. 35 """Configures a master to lease, schedule and update builds on buildbucket.
35 36
36 Requires config to have 'mergeRequests' set to False. 37 Requires config to have 'mergeRequests' set to False.
37 38
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 poller = BuildBucketPoller( 71 poller = BuildBucketPoller(
71 integrator=integrator, 72 integrator=integrator,
72 poll_interval=poll_interval, 73 poll_interval=poll_interval,
73 dry_run=dry_run) 74 dry_run=dry_run)
74 status = BuildBucketStatus( 75 status = BuildBucketStatus(
75 integrator, 76 integrator,
76 buildbucket_service_factory=buildbucket_service_factory, 77 buildbucket_service_factory=buildbucket_service_factory,
77 dry_run=dry_run) 78 dry_run=dry_run)
78 config.setdefault('change_source', []).append(poller) 79 config.setdefault('change_source', []).append(poller)
79 config.setdefault('status', []).append(status) 80 config.setdefault('status', []).append(status)
OLDNEW
« no previous file with comments | « no previous file | scripts/master/buildbucket/trigger.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698