Esempio n. 1
0
 def buildSetFinished(self, bss):
     if not self.running:
         return
     ss = bss.getSourceStamp()
     for w in self.finishedWatchers:
         w(ss)
     Nightly.buildSetFinished(self,bss)
Esempio n. 2
0
 def __init__(self, name, project, builderNames,
              minute=0, hour='*', dayOfMonth='*', month='*', dayOfWeek='*',
              branch=None):
     Nightly.__init__(self, name, builderNames, minute, hour, dayOfMonth,
                      month, dayOfWeek, branch)
     self.project = project
     self.finishedWatchers = []
Esempio n. 3
0
 def buildSetFinished(self, bss):
     if not self.running:
         return
     ss = bss.getSourceStamp()
     for w in self.finishedWatchers:
         w(ss)
     Nightly.buildSetFinished(self,bss)
Esempio n. 4
0
 def __init__(self, name, project, builderNames,
              minute=0, hour='*', dayOfMonth='*', month='*', dayOfWeek='*',
              branch=None):
     Nightly.__init__(self, name, builderNames, minute, hour, dayOfMonth,
                      month, dayOfWeek, branch)
     self.project = project
     self.finishedWatchers = []
Esempio n. 5
0
def Update(config, active_master, c):
    factory = BuildFactory()
    factory_commands = commands.FactoryCommands(factory)
    factory_commands.AddUpdateScriptStep()
    # pylint: disable=W0212
    gitzip_exe = os.path.join(factory_commands._script_dir, 'gitzip.py')
    cmd = [
        'python', gitzip_exe, '--workdir', '.', '--url',
        '%schromium/src.git' % config.Master.git_server_url, '--gs_bucket',
        'gs://chromium-git-bundles', '--gs_acl', 'public-read', '--timeout',
        '%d' % (60 * 60), '--stayalive', '200', '--verbose'
    ]
    factory.addStep(shell.ShellCommand,
                    name='gitzip',
                    description='gitzip',
                    timeout=7200,
                    workdir='',
                    command=cmd)

    builders = c.setdefault('builders', [])
    builders.append({
        'name': 'Chromium Git Packager',
        'builddir': 'chromium-git-packager',
        'factory': factory,
        'auto_reboot': False
    })

    schedulers = c.setdefault('schedulers', [])
    schedulers.append(
        Nightly(name='gitzip_nightly',
                branch=None,
                builderNames=['Chromium Git Packager'],
                hour=2,
                minute=40))
Esempio n. 6
0
	def schedulers(self):
		schedulers=[]
		for arch in self.pips_archs.iterkeys():
			if self.get_factory(arch):
				scheduler=Nightly(
					'nightly-{0}-{1}'.format(self.builderName(),arch),
					[ '{0}-{1}'.format(self.builderName(),arch) ],
					hour=self.hour,
					minute=self.minute
				)
				schedulers.append(scheduler)
		return schedulers
Esempio n. 7
0
def Update(c):
  c['schedulers'].extend([
      SingleBranchScheduler(name='webrtc_linux_scheduler',
                            branch='master',
                            treeStableTimer=0,
                            builderNames=[
                                'Linux32 ARM',
                                'Linux64 GCC',
                                'Linux64 Release (swarming)',
      ]),
      # Run WebRTC DEPS roller at CET hours: 4am, 12pm and 8pm.
      Nightly(
          name='webrtc_deps',
          branch=None,
          builderNames=['Auto-roll - WebRTC DEPS'],
          hour=[19,3,11],  # Pacific timezone.
      ),
  ])

  specs = [
    {
      'name': 'Linux32 ARM',
      'slavebuilddir': 'linux_arm',
    },
    {
      'name': 'Linux64 GCC',
      'slavebuilddir': 'linux_gcc',
    },
    {
      'name': 'Linux64 Release (swarming)',
      'slavebuilddir': 'linux_swarming',
    },
    {
      'name': 'Auto-roll - WebRTC DEPS',
      'recipe': 'webrtc/auto_roll_webrtc_deps',
      'slavebuilddir': 'linux_autoroll',
    },
  ]

  c['builders'].extend([
      {
        'name': spec['name'],
        'factory': m_annotator.BaseFactory(spec.get('recipe',
                                                    'webrtc/standalone')),
        'notify_on_missing': True,
        'category': 'linux',
        'slavebuilddir': spec['slavebuilddir'],
        'auto_reboot': False,
      } for spec in specs
  ])
Esempio n. 8
0
  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']))