def Update(config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='chromium_local', branch='master', treeStableTimer=60, builderNames=[ 'Linux ChromiumOS Full', 'Linux ChromiumOS Builder', 'Linux ChromiumOS Builder (dbg)', ]), Triggerable(name='chromiumos_rel_trigger', builderNames=[ 'Linux ChromiumOS Tests (1)', 'Linux ChromiumOS Tests (2)', ]), Triggerable(name='chromiumos_dbg_trigger', builderNames=[ 'Linux ChromiumOS Tests (dbg)(1)', 'Linux ChromiumOS Tests (dbg)(2)', 'Linux ChromiumOS Tests (dbg)(3)', ]), ]) c['builders'].extend([{ 'name': spec['buildername'], 'factory': m_annotator.BaseFactory('chromium', triggers=spec.get('triggers')), 'category': 'nonlayout', } for spec in [ { 'buildername': 'Linux ChromiumOS Full' }, { 'buildername': 'Linux ChromiumOS Builder', 'triggers': ['chromiumos_rel_trigger'] }, { 'buildername': 'Linux ChromiumOS Tests (1)' }, { 'buildername': 'Linux ChromiumOS Tests (2)' }, { 'buildername': 'Linux ChromiumOS Builder (dbg)', 'triggers': ['chromiumos_dbg_trigger'] }, { 'buildername': 'Linux ChromiumOS Tests (dbg)(1)' }, { 'buildername': 'Linux ChromiumOS Tests (dbg)(2)' }, { 'buildername': 'Linux ChromiumOS Tests (dbg)(3)' }, ]])
def Update(_config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='linux_src', branch='master', treeStableTimer=60, builderNames=[ 'Linux Builder', 'Linux Builder (dbg)(32)', 'Linux Builder (dbg)', 'Linux GN', 'Linux GN (dbg)', ]), Triggerable(name='linux_rel_trigger', builderNames=[ 'Linux Tests', ]), Triggerable(name='linux_dbg_32_trigger', builderNames=[ 'Linux Tests (dbg)(1)(32)', 'Linux Tests (dbg)(2)(32)', ]), Triggerable(name='linux_dbg_trigger', builderNames=[ 'Linux Tests (dbg)(1)', ]), ]) specs = [ { 'name': 'Linux Builder', 'triggers': ['linux_rel_trigger'], }, {'name': 'Linux Tests'}, {'name': 'Linux Builder (dbg)(32)', 'triggers': ['linux_dbg_32_trigger']}, {'name': 'Linux Tests (dbg)(1)(32)'}, {'name': 'Linux Tests (dbg)(2)(32)'}, {'name': 'Linux Builder (dbg)', 'triggers': ['linux_dbg_trigger']}, {'name': 'Linux Tests (dbg)(1)'}, {'name': 'Linux GN', 'recipe': 'chromium_gn'}, {'name': 'Linux GN (dbg)', 'recipe': 'chromium_gn'}, ] c['builders'].extend([ { 'name': spec['name'], 'factory': m_annotator.BaseFactory( spec.get('recipe', 'chromium'), factory_properties=spec.get('factory_properties'), triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': '4linux', } for spec in specs ])
def Update(c): c['schedulers'].extend([ SingleBranchScheduler(name='linux_rel_scheduler', branch='master', treeStableTimer=60, builderNames=['Linux Builder']), Triggerable(name='linux_rel_trigger', builderNames=['Linux Tester']), ]) specs = [ { 'name': 'Linux Builder', 'triggers': ['linux_rel_trigger'], }, {'name': 'Linux Tester'}, ] c['builders'].extend([ { 'name': spec['name'], 'factory': m_annotator.BaseFactory( 'webrtc/chromium', triggers=spec.get('triggers')), 'category': 'linux', 'notify_on_missing': True, } for spec in specs ])
def Update(c): c['schedulers'].extend([ SingleBranchScheduler(name='android_webrtc_scheduler', branch='master', treeStableTimer=60, builderNames=['Android Builder (dbg)']), Triggerable(name='android_trigger_dbg', builderNames=[ 'Android Tests (dbg) (KK Nexus5)', 'Android Tests (dbg) (JB Nexus7.2)', ]), ]) specs = [ { 'name': 'Android Builder (dbg)', 'triggers': ['android_trigger_dbg'], }, {'name': 'Android Tests (dbg) (KK Nexus5)'}, {'name': 'Android Tests (dbg) (JB Nexus7.2)'}, ] c['builders'].extend([ { 'name': spec['name'], 'factory': m_annotator.BaseFactory( 'webrtc/chromium', triggers=spec.get('triggers')), 'category': 'android', 'notify_on_missing': True, } for spec in specs ])
def Update(_config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='mac_asan_rel', branch='master', treeStableTimer=60, builderNames=[ 'Mac ASan 64 Builder', ]), Triggerable(name='mac_asan_64_rel_trigger', builderNames=[ 'Mac ASan 64 Tests (1)', ]), ]) specs = [ { 'name': 'Mac ASan 64 Builder', 'triggers': ['mac_asan_64_rel_trigger'], }, { 'name': 'Mac ASan 64 Tests (1)' }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_remote_run('chromium', triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': '2mac asan', } for spec in specs])
def Update(_config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='linux_asan_rel', branch='master', treeStableTimer=60, builderNames=[ 'Linux ASan LSan Builder' ]), Triggerable(name='linux_asan_rel_trigger', builderNames=[ 'Linux ASan LSan Tests (1)', 'Linux ASan Tests (sandboxed)', ]), ]) specs = [ { 'name': 'Linux ASan LSan Builder', 'triggers': ['linux_asan_rel_trigger'], }, {'name': 'Linux ASan LSan Tests (1)'}, {'name': 'Linux ASan Tests (sandboxed)'}, ] c['builders'].extend([ { 'name': spec['name'], 'factory': m_annotator.BaseFactory( spec.get('recipe', 'chromium'), triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': '1linux asan lsan', } for spec in specs ])
def Update(c): buildernames_list = ['Win Builder'] c['schedulers'].extend([ SingleBranchScheduler(name='win_webrtc_scheduler', branch='trunk', treeStableTimer=0, builderNames=buildernames_list), Periodic(name='win_periodic_scheduler', periodicBuildTimer=4*60*60, builderNames=buildernames_list), Triggerable(name='win_rel_trigger', builderNames=[ 'WinXP Tester', 'Win7 Tester', ]), ]) specs = [ { 'name': 'Win Builder', 'triggers': ['win_rel_trigger'], }, {'name': 'WinXP Tester'}, {'name': 'Win7 Tester'}, ] c['builders'].extend([ { 'name': spec['name'], 'factory': m_annotator.BaseFactory( 'webrtc/chromium', triggers=spec.get('triggers')), 'category': 'win', 'notify_on_missing': True, } for spec in specs ])
def Update(self, c): for builder in self._builders: # Update the schedulers with the builder. schedulers = builder['schedulers'] if schedulers: for scheduler in schedulers: self._schedulers[scheduler]['builders'].append( builder['name']) # Construct the category. categories = [] if builder.get('category', None): categories.append(builder['category']) if builder.get('gatekeeper', None): categories.extend(builder['gatekeeper'].split('|')) category = '|'.join(categories) # Append the builder to the list. new_builder = { 'name': builder['name'], 'factory': self._factories[builder['factory']], 'category': category, 'auto_reboot': builder['auto_reboot'] } if builder['builddir']: new_builder['builddir'] = builder['builddir'] c['builders'].append(new_builder) # Process the main schedulers for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Scheduler': instance = Scheduler( name=s_name, branch=scheduler['branch'], treeStableTimer=scheduler['treeStableTimer'], builderNames=scheduler['builders'], categories=scheduler['categories']) scheduler['instance'] = instance c['schedulers'].append(instance) # Process the dependent schedulers for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Dependent': c['schedulers'].append( Dependent( s_name, self._schedulers[scheduler['parent']]['instance'], scheduler['builders'])) # Process the treggerable schedulers for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Triggerable': c['schedulers'].append( Triggerable(s_name, scheduler['builders']))
def Update(c): buildernames_list = [ 'Android Builder (dbg)', 'Android GN', 'Android GN (dbg)', ] c['schedulers'].extend([ SingleBranchScheduler(name='android_webrtc_scheduler', branch='trunk', treeStableTimer=0, builderNames=buildernames_list), Periodic(name='android_periodic_scheduler', periodicBuildTimer=30 * 60, builderNames=buildernames_list), Triggerable(name='android_trigger_dbg', builderNames=[ 'Android Tests (dbg) (KK Nexus5)', 'Android Tests (dbg) (JB Nexus7.2)', ]), ]) specs = [ { 'name': 'Android Builder (dbg)', 'triggers': ['android_trigger_dbg'], }, { 'name': 'Android Tests (dbg) (KK Nexus5)' }, { 'name': 'Android Tests (dbg) (JB Nexus7.2)' }, { 'name': 'Android GN', 'slavebuilddir': 'android_gn', }, { 'name': 'Android GN (dbg)', 'slavebuilddir': 'android_gn', }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_annotator.BaseFactory('webrtc/chromium', triggers=spec.get('triggers')), 'category': 'android', 'notify_on_missing': True, 'slavebuilddir': spec.get('slavebuilddir', 'android'), } for spec in specs])
def SetupBuildersAndSchedulers(c, builders, slaves, ActiveMaster): """Set up builders and schedulers for the build master.""" # List of dicts for every builder. builder_dicts = [] # Builder names by scheduler. builders_by_scheduler = {s: [] for s in SCHEDULERS} # Maps a triggering builder to its triggered builders. triggered_builders = collections.defaultdict(list) def process_builder(builder, is_trybot=False): """Create a dict for the given builder and place its name in the appropriate scheduler list. """ builder_name = builder['name'] if is_trybot: builder_name = builder_name_schema.TrybotName(builder_name) # Categorize the builder based on its role. try: category = builder_name_schema.DictForBuilderName( builder_name)['role'] subcategory = builder_name.split( builder_name_schema.BUILDER_NAME_SEP)[1] category = '|'.join((category, subcategory)) except ValueError: # Assume that all builders whose names don't play by our rules are named # upstream and are therefore canaries. category = builder_name_schema.BUILDER_ROLE_CANARY builder_dict = { 'name': builder_name, 'gatekeeper': builder.get('gatekeeper_categories', ''), 'auto_reboot': builder.get('auto_reboot', DEFAULT_AUTO_REBOOT), 'slavenames': slaves.GetSlavesName(builder=builder['name']), 'category': category, 'recipe': builder.get('recipe', DEFAULT_RECIPE), } builder_dicts.append(builder_dict) parent_builder = builder.get('triggered_by') if parent_builder is not None: assert builder.get('scheduler') is None if is_trybot: parent_builder = builder_name_schema.TrybotName(parent_builder) triggered_builders[parent_builder].append(builder_name) elif is_trybot: builders_by_scheduler[TRY_SCHEDULER_NAME].append(builder_name) else: scheduler = builder.get('scheduler', PERCOMMIT_SCHEDULER_NAME) builders_by_scheduler[scheduler].append(builder_name) # Create builders and trybots. for builder in builders: process_builder(builder) if builder.get('do_trybot', DEFAULT_DO_TRYBOT): process_builder(builder, is_trybot=True) # Verify that all parent builders exist. all_nontriggered_builders = set( builders_by_scheduler[PERCOMMIT_SCHEDULER_NAME]).union( set(builders_by_scheduler[TRY_SCHEDULER_NAME])) trigger_parents = set(triggered_builders.keys()) nonexistent_parents = trigger_parents - all_nontriggered_builders if nonexistent_parents: raise Exception('Could not find parent builders: %s' % ', '.join(nonexistent_parents)) # Create the schedulers. def trigger_name(parent_builder): """Given a parent builder name, return a triggerable scheduler name.""" return 'triggers_%s' % parent_builder c['schedulers'] = [] s = Scheduler(name=PERCOMMIT_SCHEDULER_NAME, branch=POLLING_BRANCH, treeStableTimer=60, builderNames=builders_by_scheduler[PERCOMMIT_SCHEDULER_NAME]) c['schedulers'].append(s) s = timed.Nightly( name=PERIODIC_15MINS_SCHEDULER_NAME, branch=POLLING_BRANCH, builderNames=builders_by_scheduler[PERIODIC_15MINS_SCHEDULER_NAME], minute=[i * 15 for i in xrange(60 / 15)], hour='*', dayOfMonth='*', month='*', dayOfWeek='*') c['schedulers'].append(s) for parent, builders_to_trigger in triggered_builders.iteritems(): c['schedulers'].append( Triggerable(name=trigger_name(parent), builderNames=builders_to_trigger)) pools = BuildersPools(TRY_SCHEDULER_NAME) pools[TRY_SCHEDULER_NAME].extend(builders_by_scheduler[TRY_SCHEDULER_NAME]) c['schedulers'].append( TryJobRietveld(name=TRY_SCHEDULER_NAME, code_review_sites={ TRY_SCHEDULER_PROJECT: ActiveMaster.code_review_site }, pools=pools, project=TRY_SCHEDULER_PROJECT, filter_master=True)) # Create the BuildFactorys. annotator = annotator_factory.AnnotatorFactory() for builder_dict in builder_dicts: triggers = ([trigger_name(builder_dict['name'])] if builder_dict['name'] in triggered_builders else None) builder_dict['factory'] = annotator.BaseFactory(builder_dict['recipe'], triggers=triggers) # Finished! c['builders'] = builder_dicts
def Update(_config, active_master, c): c['schedulers'].extend([ Scheduler(name='linux_memory_rel', branch='master', treeStableTimer=60, builderNames=[ 'Linux ASan LSan Builder', 'Linux ChromiumOS MSan Builder', 'Linux MSan Builder', 'Linux TSan Builder', ]), Triggerable(name='linux_asan_rel_trigger', builderNames=[ 'Linux ASan LSan Tests (1)', 'Linux ASan Tests (sandboxed)', ]), Triggerable(name='linux_chromiumos_msan_rel_trigger', builderNames=['Linux ChromiumOS MSan Tests']), Triggerable(name='linux_msan_rel_trigger', builderNames=['Linux MSan Tests']), Triggerable(name='linux_tsan_rel_trigger', builderNames=['Linux TSan Tests']), ]) specs = [ { 'name': 'Linux ASan LSan Builder', 'triggers': ['linux_asan_rel_trigger'], 'category': '1linux asan lsan msan', }, { 'name': 'Linux ASan LSan Tests (1)', 'category': '1linux asan lsan msan', }, { 'name': 'Linux ASan Tests (sandboxed)', 'category': '1linux asan lsan msan', }, { 'name': 'Linux ChromiumOS MSan Builder', 'triggers': ['linux_chromiumos_msan_rel_trigger'], 'category': '1linux asan lsan msan', }, { 'name': 'Linux ChromiumOS MSan Tests', 'category': '1linux asan lsan msan', }, { 'name': 'Linux MSan Builder', 'triggers': ['linux_msan_rel_trigger'], 'category': '1linux asan lsan msan', }, { 'name': 'Linux MSan Tests', 'category': '1linux asan lsan msan', }, { 'name': 'Linux TSan Builder', 'triggers': ['linux_tsan_rel_trigger'], 'category': '10TSan v2|compile', }, { 'name': 'Linux TSan Tests', 'category': '10TSan v2', }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_remote_run('chromium', triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': spec['category'], } for spec in specs])
def Update(config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='chromium_local', branch='master', treeStableTimer=60, builderNames=[ 'Linux ChromiumOS Full', 'Linux ChromiumOS Builder', 'Linux ChromiumOS Ozone Builder', 'Linux ChromiumOS Builder (dbg)', 'Linux ChromiumOS GN', 'Linux ChromiumOS GN (dbg)', ]), Triggerable(name='chromiumos_rel_trigger', builderNames=[ 'Linux ChromiumOS Tests (1)', ]), Triggerable(name='chromiumos_rel_ozone_trigger', builderNames=[ 'Linux ChromiumOS Ozone Tests (1)', ]), Triggerable(name='chromiumos_dbg_trigger', builderNames=[ 'Linux ChromiumOS Tests (dbg)(1)', ]), ]) c['builders'].extend([ { 'name': spec['buildername'], 'factory': m_annotator.BaseFactory('chromium', triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': '1linux', } for spec in [ # Linux ChromiumOS { 'buildername': 'Linux ChromiumOS Full' }, { 'buildername': 'Linux ChromiumOS Builder', 'triggers': ['chromiumos_rel_trigger'] }, { 'buildername': 'Linux ChromiumOS Tests (1)' }, # Linux ChromiumOS GN { 'buildername': 'Linux ChromiumOS GN' }, { 'buildername': 'Linux ChromiumOS GN (dbg)' }, # Linux ChromiumOS Ozone { 'buildername': 'Linux ChromiumOS Ozone Builder', 'triggers': ['chromiumos_rel_ozone_trigger'] }, { 'buildername': 'Linux ChromiumOS Ozone Tests (1)' }, # Linux ChromiumOS (dbg) { 'buildername': 'Linux ChromiumOS Builder (dbg)', 'triggers': ['chromiumos_dbg_trigger'] }, { 'buildername': 'Linux ChromiumOS Tests (dbg)(1)' }, ] ])
def getGlobalSchedulers(self, platforms): ret = list() change_filter = ChangeFilter(repository=self.baseurl, branch=self.branch) # Fetch scheduler (triggered by event source) ret.append( SingleBranchScheduler(name="fetch-{0}".format(self.name), change_filter=change_filter, treeStableTimer=5, builderNames=["fetch-{0}".format(self.name) ])) # Nightly scheduler (started by time) # It's triggered after regular builds to take note of the last fetched source # Note that build is not started by trigger if self.nightly is not None: ret.append( NightlyTriggerable( name="nightly-{0}".format(self.name), branch=self.branch, builderNames=["nightly-{0}".format(self.name)], hour=self.nightly[0], minute=self.nightly[1], onlyIfChanged=True)) # All compiling builders comp_builders = [ "{0}-{1}".format(self.name, p.name) for p in platforms if p.canBuild(self) ] # Global build scheduler (triggered by fetch build) ret.append(Triggerable(name=self.name, builderNames=comp_builders)) # Force schedulers if self.enable_force: ret.append( ForceScheduler( name="force-scheduler-{0}-fetch".format(self.name), reason=StringParameter(name="reason", label="Reason:", required=True, size=80), builderNames=["fetch-{0}".format(self.name)], codebases=[CodebaseParameter(codebase='', hide=True)], properties=[ BooleanParameter(name="clean", label="Clean", default=False), BooleanParameter(name="package", label="Package", default=False), ])) ret.append( ForceScheduler( name="force-scheduler-{0}-build".format(self.name), reason=StringParameter(name="reason", label="Reason:", required=True, size=80), builderNames=comp_builders, codebases=[CodebaseParameter(codebase='', hide=True)], properties=[ BooleanParameter(name="clean", label="Clean", default=False), BooleanParameter(name="package", label="Package", default=False), ])) return ret
def __init__(self, name, builderNames, branch=None, **kwargs): L10nMixin.__init__(self, **kwargs) Triggerable.__init__(self, name, builderNames)
def Update(self, c): global_schedulers = dict((s.name, s) for s in c['schedulers'] if s.name.startswith('global_')) assert not (set(global_schedulers) & set(self._schedulers)) for builder in self._builders: # Update the schedulers with the builder. schedulers = builder['schedulers'] if schedulers: for scheduler in schedulers: if scheduler in global_schedulers: global_schedulers[scheduler].builderNames.append(builder['name']) else: self._schedulers[scheduler]['builders'].append(builder['name']) # Construct the category. categories = [] if builder.get('category', None): categories.append(builder['category']) if builder.get('gatekeeper', None): categories.extend(builder['gatekeeper'].split('|')) category = '|'.join(categories) # Append the builder to the list. new_builder = {'name': builder['name'], 'factory': self._factories[builder['factory']], 'category': category, 'auto_reboot': builder['auto_reboot']} if builder['builddir']: new_builder['builddir'] = builder['builddir'] if builder['slavebuilddir']: new_builder['slavebuilddir'] = builder['slavebuilddir'] c['builders'].append(new_builder) # Process the main schedulers. for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Scheduler': instance = Scheduler(name=s_name, branch=scheduler['branch'], treeStableTimer=scheduler['treeStableTimer'], builderNames=scheduler['builders'], categories=scheduler['categories']) scheduler['instance'] = instance c['schedulers'].append(instance) elif scheduler['type'] == 'URLScheduler': ident = str(uuid.uuid4()) c['change_source'].append( URLPoller(changeurl=scheduler['url'], pollInterval=scheduler['pollInterval'], category=ident, include_revision=scheduler['include_revision'])) instance = Scheduler(name=s_name, change_filter=ChangeFilter(category=ident), builderNames=scheduler['builders']) scheduler['instance'] = instance c['schedulers'].append(instance) # Process the dependent schedulers. for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Dependent': c['schedulers'].append( Dependent(s_name, self._schedulers[scheduler['parent']]['instance'], scheduler['builders'])) # Process the triggerable schedulers. for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Triggerable': c['schedulers'].append(Triggerable(s_name, scheduler['builders'])) # Process the periodic schedulers. for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Periodic': c['schedulers'].append( Periodic(s_name, periodicBuildTimer=scheduler['periodicBuildTimer'], builderNames=scheduler['builders'])) # Process the nightly schedulers. for s_name in self._schedulers: scheduler = self._schedulers[s_name] if scheduler['type'] == 'Nightly': c['schedulers'].append(Nightly(s_name, branch=scheduler['branch'], hour=scheduler['hour'], builderNames=scheduler['builders']))
def Update(config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='win_src', branch='master', treeStableTimer=60, builderNames=[ 'Win Builder', 'Win x64 Builder', 'Win x64 Builder (dbg)', 'Win Builder (dbg)', ]), Triggerable(name='win_rel_trigger', builderNames=[ 'XP Tests (1)', 'XP Tests (2)', 'XP Tests (3)', 'Vista Tests (1)', 'Vista Tests (2)', 'Vista Tests (3)', 'Win7 Tests (1)', 'Win7 Tests (2)', 'Win7 Tests (3)', 'NaCl Tests (x86-32)', 'NaCl Tests (x86-64)', ]), Triggerable(name='win_x64_rel_trigger', builderNames=[ 'Win 7 Tests x64 (1)', 'Win 7 Tests x64 (2)', 'Win 7 Tests x64 (3)', ]), Triggerable(name='win_dbg_trigger', builderNames=[ 'Win7 Tests (dbg)(1)', 'Win7 Tests (dbg)(2)', 'Win7 Tests (dbg)(3)', 'Win7 Tests (dbg)(4)', 'Win7 Tests (dbg)(5)', 'Win7 Tests (dbg)(6)', 'Interactive Tests (dbg)', 'Win8 Aura', ]), ]) specs = [ { 'name': 'Win Builder', 'triggers': ['win_rel_trigger'], }, { 'name': 'XP Tests (1)' }, { 'name': 'XP Tests (2)' }, { 'name': 'XP Tests (3)' }, { 'name': 'Vista Tests (1)' }, { 'name': 'Vista Tests (2)' }, { 'name': 'Vista Tests (3)' }, { 'name': 'Win7 Tests (1)' }, { 'name': 'Win7 Tests (2)' }, { 'name': 'Win7 Tests (3)' }, { 'name': 'Win x64 Builder', 'triggers': ['win_x64_rel_trigger'], }, { 'name': 'Win 7 Tests x64 (1)' }, { 'name': 'Win 7 Tests x64 (2)' }, { 'name': 'Win 7 Tests x64 (3)' }, { 'name': 'NaCl Tests (x86-32)' }, { 'name': 'NaCl Tests (x86-64)' }, { 'name': 'Win x64 Builder (dbg)' }, { 'name': 'Win Builder (dbg)', 'triggers': ['win_dbg_trigger'], }, { 'name': 'Win7 Tests (dbg)(1)' }, { 'name': 'Win7 Tests (dbg)(2)' }, { 'name': 'Win7 Tests (dbg)(3)' }, { 'name': 'Win7 Tests (dbg)(4)' }, { 'name': 'Win7 Tests (dbg)(5)' }, { 'name': 'Win7 Tests (dbg)(6)' }, { 'name': 'Interactive Tests (dbg)' }, { 'name': 'Win8 Aura' }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_annotator.BaseFactory( 'chromium', factory_properties=spec.get('factory_properties'), triggers=spec.get('triggers'), timeout=spec.get('timeout', 2400)), 'notify_on_missing': True, 'category': '2windows', } for spec in specs])
def Update(config, active_master, c): c['schedulers'].extend([ SingleBranchScheduler(name='mac_src', branch='master', treeStableTimer=60, builderNames=[ 'Mac Builder', 'Mac Builder (dbg)', ]), Triggerable(name='mac_rel_trigger', builderNames=[ 'Mac10.6 Tests (1)', 'Mac10.6 Tests (2)', 'Mac10.7 Tests (1)', 'Mac10.7 Tests (2)', ]), Triggerable(name='mac_dbg_trigger', builderNames=[ 'Mac 10.6 Tests (dbg)(1)', 'Mac 10.6 Tests (dbg)(2)', 'Mac 10.7 Tests (dbg)(1)', 'Mac 10.7 Tests (dbg)(2)', ]), ]) specs = [ { 'name': 'Mac Builder', 'triggers': ['mac_rel_trigger'], }, { 'name': 'Mac10.6 Tests (1)' }, { 'name': 'Mac10.6 Tests (2)' }, { 'name': 'Mac10.7 Tests (1)' }, { 'name': 'Mac10.7 Tests (2)' }, { 'name': 'Mac Builder (dbg)', 'triggers': ['mac_dbg_trigger'], }, { 'name': 'Mac 10.6 Tests (dbg)(1)' }, { 'name': 'Mac 10.6 Tests (dbg)(2)' }, { 'name': 'Mac 10.7 Tests (dbg)(1)' }, { 'name': 'Mac 10.7 Tests (dbg)(2)' }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_annotator.BaseFactory( 'chromium', factory_properties=spec.get('factory_properties'), triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': '3mac', } for spec in specs])
def AddSchedulersAndTriggers(buildmaster_config=None, slave_list=None, scheduler_name=None, branch=None): """Adds schedulers and triggers to the BuildmasterConfig based on the contents of slaves.cfg, passed in as a slave_list. This function relies on certain structure in the slaves.cfg, in particular the custom 'triggered_by' property, which is not yet commonly used to define triggers. Returns a dictionary mapping builder name, for those builders which invoke triggers, to the (synthesized) name of the trigger. TODO(kbr): this function does not yet support builders with multiple slaves behind them, but could be updated to do so. Throws an Exception if a non-existent builder is mentioned in another builder's 'triggered_by' property. Arguments: buildmaster_config: a BuildmasterConfig into which the 'schedulers' property will be defined. slave_list: a SlavesList constructed from slaves.cfg. scheduler_name: the name of the Scheduler for the polling (not triggered) builders. """ c = buildmaster_config polling_builders = [] # Maps the parent builder to a set of the names of the builders it triggers. trigger_map = collections.defaultdict(list) # Maps the name of the parent builder to the (synthesized) name of its # trigger, wrapped in a list. trigger_name_map = {} next_group_id = 0 for slave in slave_list.slaves: builder = slave['builder'] parent_builder = slave.get('triggered_by') if parent_builder is not None: if slave_list.GetSlave(builder=parent_builder) is None: raise Exception( 'Could not find parent builder %s for builder %s' % (parent_builder, builder)) trigger_map[parent_builder].append(builder) if parent_builder not in trigger_name_map: trigger_name_map[ parent_builder] = 'trigger_group_%d' % next_group_id next_group_id += 1 else: polling_builders.append(builder) s_gpu = Scheduler(name=scheduler_name, branch=branch, treeStableTimer=60, builderNames=polling_builders) c['schedulers'] = [s_gpu] for name, builders in trigger_map.iteritems(): c['schedulers'].append( Triggerable(name=trigger_name_map[name], builderNames=builders)) return trigger_name_map
def __init__(self, name, builderNames, **kwargs): L10nMixin.__init__(self, **kwargs) Triggerable.__init__(self, name, builderNames)
def Update(c): c['schedulers'].extend([ SingleBranchScheduler(name='webrtc_android_scheduler', branch='trunk', treeStableTimer=0, builderNames=[ 'Android', 'Android (dbg)', 'Android Clang (dbg)', 'Android Chromium-APK Builder', 'Android Chromium-APK Builder (dbg)', ]), Triggerable(name='android_trigger_dbg', builderNames=[ 'Android Chromium-APK Tests (KK Nexus5)(dbg)', 'Android Chromium-APK Tests (JB Nexus7.2)(dbg)', ]), Triggerable(name='android_trigger_rel', builderNames=[ 'Android Chromium-APK Tests (KK Nexus5)', 'Android Chromium-APK Tests (JB Nexus7.2)', ]), ]) specs = [ { 'name': 'Android', 'recipe': 'webrtc/standalone' }, { 'name': 'Android (dbg)', 'recipe': 'webrtc/standalone' }, { 'name': 'Android Clang (dbg)', 'recipe': 'webrtc/standalone' }, { 'name': 'Android Chromium-APK Builder', 'triggers': ['android_trigger_rel'], }, { 'name': 'Android Chromium-APK Builder (dbg)', 'triggers': ['android_trigger_dbg'], }, { 'name': 'Android Chromium-APK Tests (KK Nexus5)(dbg)' }, { 'name': 'Android Chromium-APK Tests (JB Nexus7.2)(dbg)' }, { 'name': 'Android Chromium-APK Tests (KK Nexus5)' }, { 'name': 'Android Chromium-APK Tests (JB Nexus7.2)' }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_annotator.BaseFactory(spec.get('recipe', 'webrtc/android_apk'), triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': 'android', } for spec in specs])
def Update(c): c['schedulers'].extend([ SingleBranchScheduler(name='webrtc_android_scheduler', branch='trunk', treeStableTimer=30, builderNames=[ 'Android Builder', 'Android Builder (dbg)', 'Android Clang (dbg)', 'Android ARM64 (dbg)', 'Android GN', 'Android GN (dbg)', ]), Triggerable(name='android_trigger_dbg', builderNames=[ 'Android Tests (KK Nexus5)(dbg)', 'Android Tests (JB Nexus7.2)(dbg)', ]), Triggerable(name='android_trigger_rel', builderNames=[ 'Android Tests (KK Nexus5)', 'Android Tests (JB Nexus7.2)', ]), ]) # 'slavebuilddir' below is used to reduce the number of checkouts since some # of the builders are pooled over multiple slave machines. specs = [ { 'name': 'Android Builder', 'triggers': ['android_trigger_rel'], }, { 'name': 'Android Builder (dbg)', 'triggers': ['android_trigger_dbg'], }, { 'name': 'Android Clang (dbg)', 'slavebuilddir': 'android_clang', }, { 'name': 'Android ARM64 (dbg)', 'slavebuilddir': 'android_arm64', }, { 'name': 'Android GN', 'slavebuilddir': 'android_gn', }, { 'name': 'Android GN (dbg)', 'slavebuilddir': 'android_gn', }, { 'name': 'Android Tests (KK Nexus5)(dbg)' }, { 'name': 'Android Tests (JB Nexus7.2)(dbg)' }, { 'name': 'Android Tests (KK Nexus5)' }, { 'name': 'Android Tests (JB Nexus7.2)' }, ] c['builders'].extend([{ 'name': spec['name'], 'factory': m_annotator.BaseFactory('webrtc/standalone', triggers=spec.get('triggers')), 'notify_on_missing': True, 'category': 'android', 'slavebuilddir': spec.get('slavebuilddir', 'android'), } for spec in specs])