| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # ex: set syntax=python: | 2 # ex: set syntax=python: |
| 3 | 3 |
| 4 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 4 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 # This is the buildmaster config file for the 'nacl' bot. It must | 8 # This is the buildmaster config file for the 'nacl' bot. It must |
| 9 # be installed as 'master.cfg' in your buildmaster's base directory | 9 # be installed as 'master.cfg' in your buildmaster's base directory |
| 10 # (although the filename can be changed with the --basedir option to | 10 # (although the filename can be changed with the --basedir option to |
| 11 # 'mktap buildbot master'). | 11 # 'mktap buildbot master'). |
| 12 | 12 |
| 13 # It has one job: define a dictionary named BuildmasterConfig. This | 13 # It has one job: define a dictionary named BuildmasterConfig. This |
| 14 # dictionary has a variety of keys to control different aspects of the | 14 # dictionary has a variety of keys to control different aspects of the |
| 15 # buildmaster. They are documented in docs/config.xhtml . | 15 # buildmaster. They are documented in docs/config.xhtml . |
| 16 | 16 |
| 17 import posixpath | 17 import posixpath |
| 18 | 18 |
| 19 from buildbot.scheduler import Scheduler | 19 from buildbot.scheduler import Scheduler |
| 20 | 20 |
| 21 from common import chromium_utils | 21 from common import chromium_utils |
| 22 | 22 |
| 23 from master import build_utils | 23 from master import build_utils |
| 24 from master import svn_poller_with_comparator | 24 from master import buildspec_utils |
| 25 from master import gitiles_poller | 25 from master import gitiles_poller |
| 26 from master import master_utils | 26 from master import master_utils |
| 27 from master import slaves_list | 27 from master import slaves_list |
| 28 from master.factory import annotator_factory | 28 from master.factory import annotator_factory |
| 29 | 29 |
| 30 import config | 30 import config |
| 31 import master_site_config | 31 import master_site_config |
| 32 | 32 |
| 33 ActiveMaster = master_site_config.NativeClientSDK | 33 ActiveMaster = master_site_config.NativeClientSDK |
| 34 | 34 |
| 35 if config.Master.git_internal_server_url is None: |
| 36 config.Master.git_internal_server_url = ( |
| 37 'https://chrome-internal.googlesource.com') |
| 38 |
| 35 # This is the dictionary that the buildmaster pays attention to. We also use | 39 # This is the dictionary that the buildmaster pays attention to. We also use |
| 36 # a shorter alias to save typing. | 40 # a shorter alias to save typing. |
| 37 c = BuildmasterConfig = {} | 41 c = BuildmasterConfig = {} |
| 38 | 42 |
| 39 config.DatabaseSetup(c) | 43 config.DatabaseSetup(c) |
| 40 | 44 |
| 41 ####### CHANGESOURCES | 45 ####### CHANGESOURCES |
| 42 | 46 |
| 43 def ChromiumNativeClientChangeFilter(commit_json, branch): | 47 def ChromiumNativeClientChangeFilter(commit_json, branch): |
| 44 if 'tree_diff' not in commit_json: | 48 if 'tree_diff' not in commit_json: |
| 45 return False | 49 return False |
| 46 for diff_entry in commit_json['tree_diff']: | 50 for diff_entry in commit_json['tree_diff']: |
| 47 path = diff_entry['new_path'] | 51 path = diff_entry['new_path'] |
| 48 if (path == 'DEPS' or | 52 if (path == 'DEPS' or |
| 49 path.startswith('native_client_sdk/') or | 53 path.startswith('native_client_sdk/') or |
| 50 path.startswith('ppapi/')): | 54 path.startswith('ppapi/')): |
| 51 return True | 55 return True |
| 52 return False | 56 return False |
| 53 | 57 |
| 54 | 58 |
| 55 def NativeClientSDKReleaseTreeFileSplitter(path): | |
| 56 """Filter chromium commits to those relevant to the sdk release. | |
| 57 | |
| 58 Arguments: | |
| 59 path: a path which svn reports has changed. | |
| 60 Returns: | |
| 61 A tuple containing (branchname, subpath). | |
| 62 """ | |
| 63 return ('multirel', path) | |
| 64 | |
| 65 | |
| 66 multi_poller = gitiles_poller.GitilesPoller( | 59 multi_poller = gitiles_poller.GitilesPoller( |
| 67 repo_url=config.Master.git_server_url + '/chromium/src', | 60 repo_url=config.Master.git_server_url + '/chromium/src', |
| 68 svn_branch='multi', | 61 svn_branch='multi', |
| 69 change_filter=ChromiumNativeClientChangeFilter) | 62 change_filter=ChromiumNativeClientChangeFilter) |
| 70 | 63 |
| 71 multirel_poller = svn_poller_with_comparator.SvnPollerWithComparator( | 64 release_poller = buildspec_utils.BuildspecPoller( |
| 72 multi_poller.comparator, | 65 ['build/chrome-official'], svn_mode=False) |
| 73 svnurl=('%s/tools/buildspec/build/chrome-official' % | |
| 74 config.Master.trunk_internal_url), | |
| 75 svnbin=chromium_utils.SVN_BIN, | |
| 76 split_file=NativeClientSDKReleaseTreeFileSplitter, | |
| 77 revlinktmpl=( | |
| 78 'http://chromesshgw.corp.google.com/viewvc/chrome-internal?view=rev&revi
sion=%s'), | |
| 79 pollinterval=10) | |
| 80 | 66 |
| 81 c['change_source'] = [ | 67 c['change_source'] = [ |
| 82 multi_poller, | 68 multi_poller, |
| 83 multirel_poller, | 69 release_poller, |
| 84 ] | 70 ] |
| 85 | 71 |
| 86 | 72 |
| 87 ####### BUILDERS | 73 ####### BUILDERS |
| 88 | 74 |
| 89 # buildbot/process/factory.py provides several BuildFactory classes you can | 75 # buildbot/process/factory.py provides several BuildFactory classes you can |
| 90 # start with, which implement build processes for common targets (GNU | 76 # start with, which implement build processes for common targets (GNU |
| 91 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | 77 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the |
| 92 # base class, and is configured with a series of BuildSteps. When the build | 78 # base class, and is configured with a series of BuildSteps. When the build |
| 93 # is run, the appropriate buildslave is told to execute each Step in turn. | 79 # is run, the appropriate buildslave is told to execute each Step in turn. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 # Must come before AutoSetupMaster(). | 195 # Must come before AutoSetupMaster(). |
| 210 c['buildbotURL'] = ActiveMaster.buildbot_url | 196 c['buildbotURL'] = ActiveMaster.buildbot_url |
| 211 | 197 |
| 212 # Adds common status and tools to this master. | 198 # Adds common status and tools to this master. |
| 213 master_utils.AutoSetupMaster(c, ActiveMaster, | 199 master_utils.AutoSetupMaster(c, ActiveMaster, |
| 214 order_console_by_time=True, | 200 order_console_by_time=True, |
| 215 tagComparator=multi_poller.comparator, | 201 tagComparator=multi_poller.comparator, |
| 216 public_html='../master.chromium/public_html', | 202 public_html='../master.chromium/public_html', |
| 217 templates=['./templates', | 203 templates=['./templates', |
| 218 '../master.client.nacl/templates']) | 204 '../master.client.nacl/templates']) |
| OLD | NEW |