| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 # These buildbot configurations are "private" in the sense that they are | |
| 6 # specific to Skia buildbots (not shared by other Chromium buildbots). | |
| 7 # But this file is stored within a public SVN repository, so don't put any | |
| 8 # secrets in here. | |
| 9 | |
| 10 | |
| 11 import socket | |
| 12 import skia_vars | |
| 13 import sys | |
| 14 | |
| 15 # import base class from third_party/chromium_buildbot/site_config/ | |
| 16 import config_default | |
| 17 | |
| 18 | |
| 19 CODE_REVIEW_SITE = skia_vars.GetGlobalVariable('code_review_site') | |
| 20 | |
| 21 # On startup, the build master validates the bot configuration against a known | |
| 22 # expectation. If this variable is set to true (eg. in a buildbot self-test), | |
| 23 # the master will fail to start up if validation fails. | |
| 24 # | |
| 25 # For more information: https://code.google.com/p/skia/issues/detail?id=1289 | |
| 26 die_on_validation_failure = False | |
| 27 | |
| 28 # Skia's Google Compute Engine instances. | |
| 29 # The public master which is visible to everyone. | |
| 30 SKIA_PUBLIC_MASTER_INTERNAL_FQDN = skia_vars.GetGlobalVariable( | |
| 31 'public_master_internal_fqdn') | |
| 32 # The private master which is visible only to Google corp. | |
| 33 SKIA_PRIVATE_MASTER_INTERNAL_FQDN = skia_vars.GetGlobalVariable( | |
| 34 'private_master_internal_fqdn') | |
| 35 | |
| 36 # The FYI master. | |
| 37 SKIA_FYI_MASTER_INTERNAL_FQDN = skia_vars.GetGlobalVariable( | |
| 38 'fyi_master_internal_fqdn') | |
| 39 | |
| 40 # The Android master. | |
| 41 SKIA_ANDROID_MASTER_INTERNAL_FQDN = skia_vars.GetGlobalVariable( | |
| 42 'android_master_internal_fqdn') | |
| 43 | |
| 44 # The Compile master. | |
| 45 SKIA_COMPILE_MASTER_INTERNAL_FQDN = skia_vars.GetGlobalVariable( | |
| 46 'compile_master_internal_fqdn') | |
| 47 | |
| 48 SKIA_GIT_URL = skia_vars.GetGlobalVariable('skia_git_url') | |
| 49 TRY_SVN_BASEURL = skia_vars.GetGlobalVariable('try_svn_url') | |
| 50 | |
| 51 # Env variables containing a list of build steps to skip, and a list NOT to skip | |
| 52 SKIPSTEPS_ENVIRONMENT_VARIABLE = 'TESTING_SKIPSTEPS' | |
| 53 DONTSKIPSTEPS_ENVIRONMENT_VARIABLE = 'TESTING_DONTSKIPSTEPS' | |
| 54 | |
| 55 | |
| 56 # Currently-active master instance; this is set in Master.set_active_master. | |
| 57 _ACTIVE_MASTER = None | |
| 58 | |
| 59 | |
| 60 class Master(config_default.Master): | |
| 61 googlecode_revlinktmpl = 'http://code.google.com/p/%s/source/browse?r=%s' | |
| 62 bot_password = 'epoger-temp-password' | |
| 63 default_clobber = False | |
| 64 | |
| 65 # SMTP configurations. | |
| 66 smtp_server = skia_vars.GetGlobalVariable('gce_smtp_server') | |
| 67 smtp_port = skia_vars.GetGlobalVariable('gce_smtp_port') | |
| 68 smtp_use_tls = skia_vars.GetGlobalVariable('gce_smtp_use_tls') | |
| 69 smtp_user = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 70 | |
| 71 # domains to which we will send blame emails | |
| 72 permitted_domains = ['google.com', 'chromium.org'] | |
| 73 | |
| 74 class Skia(object): | |
| 75 project_name = 'Skia' | |
| 76 project_url = skia_vars.GetGlobalVariable('project_url') | |
| 77 master_host = skia_vars.GetGlobalVariable('public_master_host') | |
| 78 master_fqdn = SKIA_PUBLIC_MASTER_INTERNAL_FQDN | |
| 79 is_production_host = socket.getfqdn() == SKIA_PUBLIC_MASTER_INTERNAL_FQDN | |
| 80 _skip_render_results_upload = False | |
| 81 _skip_bench_results_upload = False | |
| 82 master_port = skia_vars.GetGlobalVariable('public_internal_port') | |
| 83 slave_port = skia_vars.GetGlobalVariable('public_slave_port') | |
| 84 master_port_alt = skia_vars.GetGlobalVariable('public_external_port') | |
| 85 tree_closing_notification_recipients = ['skia-commit@googlegroups.com'] | |
| 86 from_address = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 87 is_publicly_visible = True | |
| 88 code_review_site = \ | |
| 89 skia_vars.GetGlobalVariable('code_review_status_listener') | |
| 90 tree_status_url = skia_vars.GetGlobalVariable('tree_status_url') | |
| 91 | |
| 92 @property | |
| 93 def do_upload_render_results(self): | |
| 94 return self.is_production_host and not self._skip_render_results_upload | |
| 95 | |
| 96 @property | |
| 97 def do_upload_bench_results(self): | |
| 98 return self.is_production_host and not self._skip_bench_results_upload | |
| 99 | |
| 100 def create_schedulers_and_builders(self, cfg): | |
| 101 """Create the Schedulers and Builders. | |
| 102 | |
| 103 Args: | |
| 104 cfg: dict; configuration dict for the build master. | |
| 105 """ | |
| 106 # This import needs to happen inside this function because modules | |
| 107 # imported by master_builders_cfg import this module. | |
| 108 import master_builders_cfg | |
| 109 master_builders_cfg.create_schedulers_and_builders( | |
| 110 sys.modules[__name__], | |
| 111 self, | |
| 112 cfg, | |
| 113 master_builders_cfg.setup_all_builders) | |
| 114 | |
| 115 class PrivateSkia(Skia): | |
| 116 project_name = 'PrivateSkia' | |
| 117 project_url = skia_vars.GetGlobalVariable('project_url') | |
| 118 master_host = skia_vars.GetGlobalVariable('private_master_host') | |
| 119 master_fqdn = SKIA_PRIVATE_MASTER_INTERNAL_FQDN | |
| 120 is_production_host = socket.getfqdn() == SKIA_PRIVATE_MASTER_INTERNAL_FQDN | |
| 121 _skip_render_results_upload = False | |
| 122 # Don't upload bench results on the private master, since we don't yet have | |
| 123 # a private destination for them. | |
| 124 _skip_bench_results_upload = True | |
| 125 master_port = skia_vars.GetGlobalVariable('private_internal_port') | |
| 126 slave_port = skia_vars.GetGlobalVariable('private_slave_port') | |
| 127 master_port_alt = skia_vars.GetGlobalVariable('private_external_port') | |
| 128 tree_closing_notification_recipients = [] | |
| 129 from_address = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 130 is_publicly_visible = False | |
| 131 code_review_site = \ | |
| 132 skia_vars.GetGlobalVariable('code_review_status_listener') | |
| 133 | |
| 134 def create_schedulers_and_builders(self, cfg): | |
| 135 """Create the Schedulers and Builders. | |
| 136 | |
| 137 Args: | |
| 138 cfg: dict; configuration dict for the build master. | |
| 139 """ | |
| 140 # These imports needs to happen inside this function because modules | |
| 141 # imported by master_builders_cfg import this module. | |
| 142 import master_builders_cfg | |
| 143 import master_private_builders_cfg | |
| 144 master_builders_cfg.create_schedulers_and_builders( | |
| 145 sys.modules[__name__], | |
| 146 self, | |
| 147 cfg, | |
| 148 master_private_builders_cfg.setup_all_builders) | |
| 149 | |
| 150 class FYISkia(Skia): | |
| 151 project_name = 'FYISkia' | |
| 152 project_url = skia_vars.GetGlobalVariable('project_url') | |
| 153 master_host = skia_vars.GetGlobalVariable('fyi_master_host') | |
| 154 master_fqdn = SKIA_FYI_MASTER_INTERNAL_FQDN | |
| 155 is_production_host = socket.getfqdn() == SKIA_FYI_MASTER_INTERNAL_FQDN | |
| 156 _skip_render_results_upload = False | |
| 157 _skip_bench_results_upload = False | |
| 158 master_port = skia_vars.GetGlobalVariable('fyi_internal_port') | |
| 159 slave_port = skia_vars.GetGlobalVariable('fyi_slave_port') | |
| 160 master_port_alt = skia_vars.GetGlobalVariable('fyi_external_port') | |
| 161 tree_closing_notification_recipients = [] | |
| 162 from_address = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 163 is_publicly_visible = True | |
| 164 code_review_site = \ | |
| 165 skia_vars.GetGlobalVariable('code_review_status_listener') | |
| 166 | |
| 167 def create_schedulers_and_builders(self, cfg): | |
| 168 """Create the Schedulers and Builders. | |
| 169 | |
| 170 Args: | |
| 171 cfg: dict; configuration dict for the build master. | |
| 172 """ | |
| 173 # These imports needs to happen inside this function because modules | |
| 174 # imported by master_builders_cfg import this module. | |
| 175 import master_builders_cfg | |
| 176 import master_fyi_builders_cfg | |
| 177 master_builders_cfg.create_schedulers_and_builders( | |
| 178 sys.modules[__name__], | |
| 179 self, | |
| 180 cfg, | |
| 181 master_fyi_builders_cfg.setup_all_builders) | |
| 182 | |
| 183 class AndroidSkia(Skia): | |
| 184 project_name = 'AndroidSkia' | |
| 185 project_url = skia_vars.GetGlobalVariable('project_url') | |
| 186 master_host = skia_vars.GetGlobalVariable('android_master_host') | |
| 187 master_fqdn = SKIA_ANDROID_MASTER_INTERNAL_FQDN | |
| 188 is_production_host = socket.getfqdn() == SKIA_ANDROID_MASTER_INTERNAL_FQDN | |
| 189 _skip_render_results_upload = False | |
| 190 _skip_bench_results_upload = False | |
| 191 master_port = skia_vars.GetGlobalVariable('android_internal_port') | |
| 192 slave_port = skia_vars.GetGlobalVariable('android_slave_port') | |
| 193 master_port_alt = skia_vars.GetGlobalVariable('android_external_port') | |
| 194 tree_closing_notification_recipients = [] | |
| 195 from_address = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 196 is_publicly_visible = True | |
| 197 code_review_site = \ | |
| 198 skia_vars.GetGlobalVariable('code_review_status_listener') | |
| 199 | |
| 200 def create_schedulers_and_builders(self, cfg): | |
| 201 """Create the Schedulers and Builders. | |
| 202 | |
| 203 Args: | |
| 204 cfg: dict; configuration dict for the build master. | |
| 205 """ | |
| 206 # These imports needs to happen inside this function because modules | |
| 207 # imported by master_builders_cfg import this module. | |
| 208 import master_builders_cfg | |
| 209 import master_android_builders_cfg | |
| 210 master_builders_cfg.create_schedulers_and_builders( | |
| 211 sys.modules[__name__], | |
| 212 self, | |
| 213 cfg, | |
| 214 master_android_builders_cfg.setup_all_builders) | |
| 215 | |
| 216 class CompileSkia(Skia): | |
| 217 project_name = 'CompileSkia' | |
| 218 project_url = skia_vars.GetGlobalVariable('project_url') | |
| 219 master_host = skia_vars.GetGlobalVariable('compile_master_host') | |
| 220 master_fqdn = SKIA_COMPILE_MASTER_INTERNAL_FQDN | |
| 221 is_production_host = socket.getfqdn() == SKIA_COMPILE_MASTER_INTERNAL_FQDN | |
| 222 _skip_render_results_upload = False | |
| 223 _skip_bench_results_upload = False | |
| 224 master_port = skia_vars.GetGlobalVariable('compile_internal_port') | |
| 225 slave_port = skia_vars.GetGlobalVariable('compile_slave_port') | |
| 226 master_port_alt = skia_vars.GetGlobalVariable('compile_external_port') | |
| 227 tree_closing_notification_recipients = ['skia-commit@googlegroups.com'] | |
| 228 from_address = skia_vars.GetGlobalVariable('gce_smtp_user') | |
| 229 is_publicly_visible = True | |
| 230 code_review_site = \ | |
| 231 skia_vars.GetGlobalVariable('code_review_status_listener') | |
| 232 | |
| 233 def create_schedulers_and_builders(self, cfg): | |
| 234 """Create the Schedulers and Builders. | |
| 235 | |
| 236 Args: | |
| 237 cfg: dict; configuration dict for the build master. | |
| 238 """ | |
| 239 # These imports needs to happen inside this function because modules | |
| 240 # imported by master_builders_cfg import this module. | |
| 241 import master_builders_cfg | |
| 242 import master_compile_builders_cfg | |
| 243 master_builders_cfg.create_schedulers_and_builders( | |
| 244 sys.modules[__name__], | |
| 245 self, | |
| 246 cfg, | |
| 247 master_compile_builders_cfg.setup_all_builders) | |
| 248 | |
| 249 # List of the valid master classes. | |
| 250 valid_masters = [Skia, PrivateSkia, FYISkia, AndroidSkia, CompileSkia] | |
| 251 | |
| 252 @staticmethod | |
| 253 def set_active_master(master_name): | |
| 254 """Sets the master with the given name as active and returns its instance. | |
| 255 | |
| 256 Args: | |
| 257 master_name: string; name of the desired build master. | |
| 258 """ | |
| 259 global _ACTIVE_MASTER | |
| 260 master = Master.get(master_name) | |
| 261 if master: | |
| 262 _ACTIVE_MASTER = master() | |
| 263 return _ACTIVE_MASTER | |
| 264 raise Exception('Invalid master: %s' % master_name) | |
| 265 | |
| 266 @staticmethod | |
| 267 def get(master_name): | |
| 268 """Return the master with the given name or None if no such master exists. | |
| 269 | |
| 270 Args: | |
| 271 master_name: string; name of the desired build master. | |
| 272 """ | |
| 273 for master in Master.valid_masters: | |
| 274 if master_name == master.__name__: | |
| 275 return master | |
| 276 return None | |
| 277 | |
| 278 @staticmethod | |
| 279 def get_active_master(): | |
| 280 """Returns the instance of the active build master.""" | |
| 281 return _ACTIVE_MASTER | |
| 282 | |
| 283 class Archive(config_default.Archive): | |
| 284 bogus_var = 'bogus_value' | |
| 285 | |
| 286 | |
| 287 class Distributed(config_default.Distributed): | |
| 288 bogus_var = 'bogus_value' | |
| OLD | NEW |