| Index: masters/master.chromiumos.tryserver/master.cfg
|
| diff --git a/masters/master.chromiumos.tryserver/master.cfg b/masters/master.chromiumos.tryserver/master.cfg
|
| index c57a2ac47662fad8347de94c7127ac98524199e4..8ede6c1d6d4b0f9ccdf0a00a0b935263346a404d 100644
|
| --- a/masters/master.chromiumos.tryserver/master.cfg
|
| +++ b/masters/master.chromiumos.tryserver/master.cfg
|
| @@ -14,13 +14,13 @@ import tempfile
|
|
|
| # These modules come from scripts/master, which must be in the PYTHONPATH.
|
| from common import cros_chromite
|
| +from master import gitiles_poller
|
| from master import master_utils
|
| from master import slaves_list
|
| from master.cros_try_job_git import CrOSTryJobGit
|
| -from master.factory import chromeos_factory
|
| +from master.factory import annotator_factory, chromeos_factory
|
|
|
| from buildbot.buildslave import BuildSlave
|
| -from buildbot.changes.gitpoller import GitPoller
|
| from buildbot.process.properties import WithProperties
|
|
|
| # These modules come from scripts/common, which must be in the PYTHONPATH.
|
| @@ -38,21 +38,19 @@ config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host)
|
|
|
| ####### CHANGESOURCES
|
|
|
| -# The gitpoller doesn't play well with SSH-AGENT, so for test masters running
|
| -# on a developer's machine, you need to set up a password-less ssh key.
|
| c['change_source'] = []
|
| -c['change_source'].append(GitPoller(
|
| - repourl=ActiveMaster.repo_url_ext,
|
| - branch='master' if ActiveMaster.is_production_host else 'test',
|
| - workdir=tempfile.mkdtemp(prefix='gitpoller_ext'),
|
| - pollinterval=10))
|
| +c['change_source'].append(gitiles_poller.GitilesPoller(
|
| + ActiveMaster.repo_url_ext,
|
| + branches=['master'],
|
| + ))
|
| +gitiles_comparator = c['change_source'][-1].comparator
|
|
|
| if ActiveMaster.repo_url_int:
|
| - c['change_source'].append(GitPoller(
|
| - repourl=ActiveMaster.repo_url_int,
|
| - branch='master' if ActiveMaster.is_production_host else 'test',
|
| - workdir=tempfile.mkdtemp(prefix='gitpoller_int'),
|
| - pollinterval=10))
|
| + c['change_source'].append(gitiles_poller.GitilesPoller(
|
| + ActiveMaster.repo_url_int,
|
| + branches=['master'],
|
| + comparator=gitiles_comparator,
|
| + ))
|
|
|
| # Avoid merging requests.
|
| c['mergeRequests'] = lambda *_: False
|
| @@ -78,28 +76,27 @@ c['builders'] = []
|
| nextSlaveAndBuild = chromiumos_tryserver_util.NextSlaveAndBuild(
|
| testing_slave_pool=testing_slave_pool)
|
|
|
| +# Annotator factory object.
|
| +factory_obj = annotator_factory.AnnotatorFactory(
|
| + active_master=ActiveMaster)
|
| +
|
| # The 'builders' list defines the Builders. Each one is configured with a
|
| # dictionary, using the following keys:
|
| # name (required): the name used to describe this bilder
|
| # category (required): it is not used in the normal 'buildbot' meaning. It is
|
| # used by gatekeeper to determine which steps it should
|
| # look for to close the tree.
|
| -def _GetCBuildbotBuilder(name, category, params=None, clobber=False):
|
| -
|
| - factory = chromeos_factory.CbuildbotFactory(
|
| - params=params,
|
| - trybot=True,
|
| - clobber=clobber).get_factory()
|
| -
|
| - return {
|
| +def _GetCBuildbotBuilder(name, category):
|
| + builder = {
|
| + 'name': name,
|
| 'builddir': name.replace(' ', '-'),
|
| 'category': category,
|
| - 'factory': factory,
|
| - 'name': name,
|
| + 'factory': chromeos_factory.ChromiteRecipeFactory(
|
| + factory_obj, 'cros/cbuildbot_tryjob'),
|
| 'slavenames': DEFINED_SLAVES.GetSlavesName(builder=name),
|
| 'nextSlaveAndBuild' : nextSlaveAndBuild,
|
| }
|
| -
|
| + return builder
|
|
|
| def _GetCategory(cfg):
|
| if cfg in ('etc',):
|
| @@ -116,7 +113,6 @@ def _GetBuilder(cfg):
|
| builder = _GetCBuildbotBuilder(
|
| cfg,
|
| _GetCategory(cfg),
|
| - params=WithProperties('%(chromeos_config:-)s'),
|
| )
|
| return builder
|
|
|
| @@ -130,8 +126,6 @@ def _GetEtcBuilder():
|
| builder = _GetCBuildbotBuilder(
|
| name,
|
| _GetCategory(name),
|
| - params=WithProperties('%(chromeos_config:-)s'),
|
| - clobber=True,
|
| )
|
| return builder
|
|
|
| @@ -208,8 +202,8 @@ from master.try_mail_notifier import TryMailNotifier
|
| def _GetInfo(info, build):
|
| """Get the subject of a trybot email."""
|
| info = info.copy()
|
| - info['chromeos_config'] = build.getProperties().getProperty('chromeos_config',
|
| - info['builder'])
|
| + info['cbb_config'] = build.getProperties().getProperty('cbb_config',
|
| + info['builder'])
|
| return info
|
|
|
| c['status'].append(TryMailNotifier(
|
| @@ -217,7 +211,7 @@ c['status'].append(TryMailNotifier(
|
| failure_message='TRY FAILED',
|
| footer=email_footer,
|
| fromaddr=ActiveMaster.from_address,
|
| - subject="try %(result)s for %(reason)s on %(chromeos_config)s",
|
| + subject="try %(result)s for %(reason)s on %(cbb_config)s",
|
| mode='all',
|
| get_info=_GetInfo,
|
| relayhost=smtp_host,
|
|
|