
from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

from master.factory import annotator_factory

m_annotator = annotator_factory.AnnotatorFactory()

def Update(c):
  c['schedulers'].append(
      SingleBranchScheduler(name='chromium_scheduler',
                            change_filter=ChangeFilter(project='chromium',
                                                       branch='master'),
                            treeStableTimer=60,
                            builderNames=[
                              'Win Builder',
                              'Mac Builder',
                              'Linux Builder',
                            ]),
  )
  specs = [
    {'name': 'Win Builder', 'category': 'win'},
    {'name': 'WinXP Tester', 'category': 'win'},
    {'name': 'Win7 Tester', 'category': 'win'},
    {'name': 'Win8 Tester', 'category': 'win'},
    {'name': 'Win10 Tester', 'category': 'win'},
    {'name': 'Mac Builder', 'category': 'mac'},
    {'name': 'Mac Tester', 'category': 'mac'},
    {'name': 'Linux Builder', 'category': 'linux'},
    {'name': 'Linux Tester', 'category': 'linux'},
  ]

  c['builders'].extend([
      {
        'name': spec['name'],
        'factory': m_annotator.BaseFactory('webrtc/chromium'),
        'category': spec['category'],
        'notify_on_missing': True,
      } for spec in specs
  ])



from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

from master.factory import annotator_factory

m_annotator = annotator_factory.AnnotatorFactory()

def Update(c):
  c['schedulers'].append(
      SingleBranchScheduler(name='chromium_scheduler',
                            change_filter=ChangeFilter(project='chromium',
                                                       branch='master'),
                            treeStableTimer=60,
                            builderNames=[
                              'Win Builder',
                              'Mac Builder',
                              'Linux Builder',
                            ]),
  )
  specs = [
    {'name': 'Win Builder', 'category': 'win'},
    {'name': 'WinXP Tester', 'category': 'win'},
    {'name': 'Win7 Tester', 'category': 'win'},
    {'name': 'Win8 Tester', 'category': 'win'},
    {'name': 'Win10 Tester', 'category': 'win'},
    {'name': 'Mac Builder', 'category': 'mac'},
    {'name': 'Mac Tester', 'category': 'mac'},
    {'name': 'Linux Builder', 'recipe': 'chromium', 'category': 'linux'},
    {'name': 'Linux Tester', 'recipe': 'chromium', 'category': 'linux'},
  ]

  c['builders'].extend([
      {
        'name': spec['name'],
        'factory': m_annotator.BaseFactory(spec.get('recipe',
                                                    'webrtc/chromium')),
        'category': spec['category'],
        'notify_on_missing': True,
      } for spec in specs
  ])


Switch chromium.webrtc Linux builders to chromium recipe.
WebRTC: Switch chromium.webrtc Linux builders to chromium recipe.

With https://codereview.chromium.org/1406253003/ landed this is the
first CL in a series of careful rollout to the new recipe.

BUG=538259
TBR=phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/1508933002

git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@297884 0039d316-1c4b-4281-b951-d872f2087c98

  
  from buildbot.changes.filter import ChangeFilter
  from buildbot.schedulers.basic import SingleBranchScheduler
  
  from master.factory import annotator_factory
  
  m_annotator = annotator_factory.AnnotatorFactory()
  
  def Update(c):
    c['schedulers'].append(
        SingleBranchScheduler(name='chromium_scheduler',
                              change_filter=ChangeFilter(project='chromium',
                                                         branch='master'),
                              treeStableTimer=60,
                              builderNames=[
                                'Win Builder',
                                'Mac Builder',
                                'Linux Builder',
                              ]),
    )
    specs = [
      {'name': 'Win Builder', 'category': 'win'},
      {'name': 'WinXP Tester', 'category': 'win'},
      {'name': 'Win7 Tester', 'category': 'win'},
      {'name': 'Win8 Tester', 'category': 'win'},
      {'name': 'Win10 Tester', 'category': 'win'},
      {'name': 'Mac Builder', 'category': 'mac'},
      {'name': 'Mac Tester', 'category': 'mac'},
-     {'name': 'Linux Builder', 'category': 'linux'},
+     {'name': 'Linux Builder', 'recipe': 'chromium', 'category': 'linux'},
-     {'name': 'Linux Tester', 'category': 'linux'},
+     {'name': 'Linux Tester', 'recipe': 'chromium', 'category': 'linux'},
    ]
  
    c['builders'].extend([
        {
          'name': spec['name'],
-         'factory': m_annotator.BaseFactory('webrtc/chromium'),
+         'factory': m_annotator.BaseFactory(spec.get('recipe',
+                                                     'webrtc/chromium')),
          'category': spec['category'],
          'notify_on_missing': True,
        } for spec in specs
    ])
  
  
Switch chromium.webrtc Linux builders to chromium recipe.
## Code Before:

from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

from master.factory import annotator_factory

m_annotator = annotator_factory.AnnotatorFactory()

def Update(c):
  c['schedulers'].append(
      SingleBranchScheduler(name='chromium_scheduler',
                            change_filter=ChangeFilter(project='chromium',
                                                       branch='master'),
                            treeStableTimer=60,
                            builderNames=[
                              'Win Builder',
                              'Mac Builder',
                              'Linux Builder',
                            ]),
  )
  specs = [
    {'name': 'Win Builder', 'category': 'win'},
    {'name': 'WinXP Tester', 'category': 'win'},
    {'name': 'Win7 Tester', 'category': 'win'},
    {'name': 'Win8 Tester', 'category': 'win'},
    {'name': 'Win10 Tester', 'category': 'win'},
    {'name': 'Mac Builder', 'category': 'mac'},
    {'name': 'Mac Tester', 'category': 'mac'},
    {'name': 'Linux Builder', 'category': 'linux'},
    {'name': 'Linux Tester', 'category': 'linux'},
  ]

  c['builders'].extend([
      {
        'name': spec['name'],
        'factory': m_annotator.BaseFactory('webrtc/chromium'),
        'category': spec['category'],
        'notify_on_missing': True,
      } for spec in specs
  ])


## Instruction:
Switch chromium.webrtc Linux builders to chromium recipe.
## Code After:

from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

from master.factory import annotator_factory

m_annotator = annotator_factory.AnnotatorFactory()

def Update(c):
  c['schedulers'].append(
      SingleBranchScheduler(name='chromium_scheduler',
                            change_filter=ChangeFilter(project='chromium',
                                                       branch='master'),
                            treeStableTimer=60,
                            builderNames=[
                              'Win Builder',
                              'Mac Builder',
                              'Linux Builder',
                            ]),
  )
  specs = [
    {'name': 'Win Builder', 'category': 'win'},
    {'name': 'WinXP Tester', 'category': 'win'},
    {'name': 'Win7 Tester', 'category': 'win'},
    {'name': 'Win8 Tester', 'category': 'win'},
    {'name': 'Win10 Tester', 'category': 'win'},
    {'name': 'Mac Builder', 'category': 'mac'},
    {'name': 'Mac Tester', 'category': 'mac'},
    {'name': 'Linux Builder', 'recipe': 'chromium', 'category': 'linux'},
    {'name': 'Linux Tester', 'recipe': 'chromium', 'category': 'linux'},
  ]

  c['builders'].extend([
      {
        'name': spec['name'],
        'factory': m_annotator.BaseFactory(spec.get('recipe',
                                                    'webrtc/chromium')),
        'category': spec['category'],
        'notify_on_missing': True,
      } for spec in specs
  ])

