def getSchedulers(): return [ AnyBranchScheduler( name="flocker", treeStableTimer=5, builderNames=BUILDERS, # Only build certain branches because problems arise when we build # many branches such as queues and request limits. change_filter=ChangeFilter(branch_fn=build_automatically), codebases={ "flocker": { "repository": GITHUB + b"/flocker" }, }, ), ForceScheduler( name="force-flocker", codebases=[ CodebaseParameter( "flocker", branch=StringParameter("branch", default="master", size=80), repository=FixedParameter("repository", default=GITHUB + b"/flocker"), ), ], properties=[ report_expected_failures_parameter, ], builderNames=BUILDERS, ), ]
def get_schedulers() : from buildbot.schedulers.basic import AnyBranchScheduler from buildbot.schedulers.forcesched import ForceScheduler from buildbot.schedulers.forcesched import StringParameter from buildbot.schedulers.forcesched import FixedParameter from buildbot.plugins import util import builders return [ AnyBranchScheduler( name = 'default', reason = 'main repository source code modification', builderNames = builders.get_builder_names(), treeStableTimer = 20, change_filter = util.ChangeFilter( repository_fn = lambda repository : bool('github.com/SFML/SFML' in repository) ), properties = { 'trigger' : 'internal' } ), AnyBranchScheduler( name = 'foreign', builderNames = builders.get_builder_names(), change_filter = util.ChangeFilter( repository_fn = lambda repository : bool('github.com/SFML/SFML' not in repository) ), properties = { 'trigger' : 'external' } ), ForceScheduler( name = 'force', reason = StringParameter(name = "reason", default = "manual build", size = 100), builderNames = builders.get_builder_names(), branch = StringParameter(name = "branch", default = "master", size = 100), revision = StringParameter(name = "revision", default = "", size = 100), repository = StringParameter(name = "repository", default = "https://github.com/SFML/SFML.git", regex = r"^https://github.com/[\w-]*/[\w-]*\.git$", size = 100), project = StringParameter(name = "project", default = "SFML", size = 100), properties = [ util.FixedParameter(name = "trigger", default = "force") ] ) ]
def get_schedulers(): from buildbot.schedulers.basic import SingleBranchScheduler from buildbot.schedulers.basic import AnyBranchScheduler from buildbot.schedulers.forcesched import ForceScheduler from buildbot.schedulers.forcesched import StringParameter from buildbot.schedulers.forcesched import FixedParameter from buildbot.plugins import util import builders return [ SingleBranchScheduler( name='master', reason='main repository source code modification', builderNames=['coverity'], treeStableTimer=20, change_filter=util.ChangeFilter(branch='master')), AnyBranchScheduler(name='default', reason='main repository source code modification', builderNames=builders.get_builder_names(), treeStableTimer=20), ForceScheduler( name='force', reason=StringParameter(name="reason", default="manual build", size=100), builderNames=builders.get_builder_names(), codebases=[ util.CodebaseParameter( "", label="Codebase", branch=StringParameter(name="branch", default="master", size=100), revision=StringParameter(name="revision", default="", size=100), repository=StringParameter( name="repository", default="https://github.com/SFML/SFML.git", regex=r"^https://github.com/[\w-]*/[\w-]*\.git$", size=100), project=StringParameter(name="project", default="SFML", size=100), ) ], properties=[util.FixedParameter(name="trigger", default="force")]) ]
from buildbot.config import BuilderConfig from buildbot.process.factory import BuildFactory from buildbot.schedulers.basic import AnyBranchScheduler from buildbot.schedulers.forcesched import ForceScheduler from buildbot.steps.shell import ShellCommand from buildbot.worker import Worker c['workers'] = [Worker("local1", "localpw")] c['protocols'] = {'pb': {'port': 'tcp:0'}} c['change_source'] = [] c['change_source'] = PBChangeSource() c['schedulers'] = [] c['schedulers'].append( AnyBranchScheduler(name="all", change_filter=ChangeFilter(project_re='^testy/'), treeStableTimer=1 * 60, builderNames=[ 'testy', ])) c['schedulers'].append(ForceScheduler(name="force", builderNames=["testy"])) f1 = BuildFactory() f1.addStep(ShellCommand(command='echo hi')) c['builders'] = [] c['builders'].append( BuilderConfig(name="testy", workernames=["local1"], factory=f1)) c['status'] = [] c['title'] = "test" c['titleURL'] = "test" c['buildbotURL'] = "http://localhost:8010/" c['db'] = {'db_url': "sqlite:///state.sqlite"}
"change_source": [ GitPoller(repourl=env('BB_REPOURL', 'https://github.com/dolphin-emu/dolphin.git'), pollInterval=5), ], "workers": [ worker.LocalWorker("test-worker"), ], "builders": [ BuilderConfig(name="test-builder", workernames=["test-worker"], factory=make_test_factory()), # TODO: add relevant builders from prod conf ], "schedulers": [ AnyBranchScheduler(name="test-scheduler", builderNames=["test-builder"]), ], "www": { "port": PORT, "auth": UserPasswordAuth( {env('BB_USER', 'dolphin'): env('BB_PSWD', 'dolphin')}), "plugins": { "waterfall_view": { "num_builds": 50 }, "console_view": {}, }, }, "services": [],
from buildbot.schedulers.basic import AnyBranchScheduler from buildbot.schedulers.triggerable import Triggerable from buildbot.changes.filter import ChangeFilter from buildbot.process.factory import BuildFactory from buildbot.steps.master import MasterShellCommand from buildscripts import steps as buildsteps project = __opts__['project'] c['schedulers'].append( AnyBranchScheduler(name=project, change_filter=ChangeFilter(project=project, category='default'), builderNames=['{0} source'.format(project)])) c["schedulers"].append( Triggerable(name="{0} packaging".format(project), builderNames=["deb_packaging", "rpm_packaging"])) def push_to_github(__opts__): cwd = 'sandboxes/{0}/svn2git'.format(project) return [ MasterShellCommand(command=""" cd sandboxes/{0}/svn2git svn2git --rebase --verbose git push origin master""".format(project), description='Pushing commit to GitHub', descriptionDone='Push commit to GitHub (trunk)'), ]
# name="cpp-ethereum-develop-pr-git", # change_filter=filter.ChangeFilter(codebase='cpp-ethereum', category='pull'), # codebases=all_cpp_ethereum_codebases, # treeStableTimer=60, # builderNames=[ # "Linux C++ pull requests", # "Linux C++ evmjit pull requests", # "OSX C++ pull requests", # "OSX C++ evmjit pull requests", # "Windows C++ pull requests" # ]), AnyBranchScheduler( name="go-ethereum-develop-pr-git", change_filter=filter.ChangeFilter(codebase='go-ethereum', category='pull'), codebases=all_go_ethereum_codebases, treeStableTimer=60, builderNames=[ "Linux Go pull requests", "ARM Go pull requests", "OSX Go pull requests", "Windows Go pull requests" ]), AnyBranchScheduler(name="mist-develop-pr-git", change_filter=filter.ChangeFilter( codebase='go-ethereum', category='pull'), codebases=all_mist_codebases, treeStableTimer=60, builderNames=["Mist pull requests"]), AnyBranchScheduler( name="pyethereum-pr-git", change_filter=filter.ChangeFilter(codebase='pyethereum', category='pull'), codebases=all_pyethereum_codebases,
return False c['schedulers'] = [] c['schedulers'].append( AnyBranchScheduler( name="build-scheduler", treeStableTimer=None, builderNames=[ "CMake-Ubuntu-10.10", "Ubuntu-10.10", "CMake-Ubuntu-12.04-x64", "Ubuntu-12.04-x64", #"CMake-Debian-6.0-x64", # TODO try to lower the requirement to cmake 2.8.2 "Debian-6.0-x64", "CMake-Cygwin", "Cygwin", "CMake-Windows-MinGW", "CMake-Windows-MSYS", "CMake-Windows-NMake-VS10", "CMake-Windows-VS10", "Windows-VS10", "CMake-Windows-NMake-VS10-x64", "CMake-Windows-VS10-x64", ], fileIsImportant=ea_should_build, onlyImportant=True)) c['schedulers'].append( Triggerable(name="test-Ubuntu-12.04-x64-scheduler", builderNames=["test-Ubuntu-12.04-x64"])) #c['schedulers'].append(AnyBranchScheduler( # name = "test-scheduler",
'command': all 'branches' = ChangeFilter( branch_fn = [ 'master' ] ) } defined_factories['pp_maker_factory'] = BuildFactory( _make_factory_step_generator(pp['name'], pp['uri'], pp['command'] ) ) c['change_source'].append(GitPoller( pp['uri'], workdir='/srv/buildbot', branches=pp['branches'], pollinterval=random.randint(300,600) )) c['builders'].append( BuilderConfig( name='%s Builder' % pp['name'], slavenames=lan_buildslaves, factory=defined_factories['pp_maker_factory'] ) ) c['schedulers'].append(AnyBranchScheduler( name="%s_scheduler" % guide_publisher, builderNames=['%s Builder' % pp['name']], change_filter=pp['branches'], treeStableTimer=None ))
# SCHEDULERS # Configure the Schedulers, which decide how to react to incoming changes. from buildbot.schedulers.basic import AnyBranchScheduler from buildbot.schedulers.forcesched import ForceScheduler c['schedulers'] = [ # Main scheduler, activated when a branch in the Nim repository is changed. AnyBranchScheduler(name="git-build-scheduler", treeStableTimer=None, builderNames=all_builder_names, codebases={ 'nim': { 'repository': '' }, 'csources': { 'repository': '' }, 'scripts': { 'repository': '' }, }), # Force-build scheduler, activated when its button is clicked on the # build admins page. ForceScheduler(name="force-build-scheduler", builderNames=all_builder_names, buttonName="Force Compiler Build", properties=[], codebases={ 'nim': {
# Make sure the baserev exists locally. GitHub's "baserev" property is # the current base branch head, which isn't guaranteed to exist in the PR # branch (e.g. if it hasn't been rebased). f.addStep(ShellCommand(command=['git', 'fetch', 'origin'])) f.addStep( ShellCommand( command=['Tools/lint.sh', WithProperties("%s...", "baserev")], logEnviron=False, description="lint", descriptionDone="lint", haltOnFailure=False)) return f win64_release = AnyBranchScheduler(name="win64-release", builderNames=["release-win-x64"]) win64_debug = Dependent(name="win64-debug", upstream=win64_release, builderNames=["debug-win-x64"]) osx_release = AnyBranchScheduler(name="osx-release", builderNames=["release-osx-x64"]) deb64_release = AnyBranchScheduler(name="deb64-release", builderNames=["release-deb-x64"]) ubu64_release = AnyBranchScheduler(name="ubu64-release", builderNames=["release-ubu-x64"]) android_release = Dependent(name="android-release", upstream=ubu64_release, builderNames=["release-android"]) freebsd_release = AnyBranchScheduler(name="freebsd-release",
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) elif scheduler['type'] == 'FilterScheduler': instance = AnyBranchScheduler( name=s_name, change_filter=scheduler['filter'], treeStableTimer=scheduler['treeStableTimer'], 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']))