# -*- python -*- # ex: set syntax=python: # ############################################################################# # master.cfg - Configuration file for GDAL BuildBot instance ############################################################################# # # Author: Mateusz Loskot # import os import sys ############################################################################# ####### ENVIRONMENT CONFIGURATION # Location to base infrastructure module - 'osgeo' sys.path.append(os.path.join(os.getcwd(), '..')) # Load common environment import osgeo from config import _common as common ############################################################################# ####### MASTER CONFIGURATION from buildbot.scheduler import Scheduler from buildbot.scheduler import Nightly from buildbot.changes.pb import PBChangeSource # Dictionary that the buildmaster pays attention to # We also use a shorter alias to save typing c = BuildmasterConfig = {} c['slaves'] = [] c['change_source'] = PBChangeSource(prefix='trunk/') c['schedulers'] = [] c['builders'] = [] # Collection binding builders to schedulers by name builderNames = {} builderNames['quick'] = [] builderNames['full'] = [] builderNames['stable'] = [] ####### BUILD SLAVES CONFIGURATION # Collect configuration modules for buildslaves # Evey buildslave is configured in separate .py script configModules = osgeo.getConfigModules(os.path.join(os.getcwd(), 'config')) # Load configuration for every buildslave for module in configModules: # Import configuration for single slave = osgeo.importSlaveConfig('config', module); # Add buildslave bot credentials c['slaves'].append(slave.config.getBot()) # Collect configuraiton of builders, by schedulers for schedulerName in builderNames.keys(): builders = slave.config.getBuilders(schedulerName) for builder in builders: builderNames[schedulerName].append(builder['name']) c['builders'].append(builder) ####### SCHEDULERS CONFIGURATION #### QUICK if builderNames.has_key('quick') is True: schedulerQuick = Scheduler(name = 'quick', builderNames = builderNames['quick'], branch = None, treeStableTimer = 5*60) c['schedulers'].append(schedulerQuick) #### FULL if builderNames.has_key('full') is True: schedulerFull = Scheduler(name = 'full', builderNames = builderNames['full'], branch=None, treeStableTimer=240*60) c['schedulers'].append(schedulerFull) #### NIGHTLY - uses full builders schedulerNightly = Nightly(name = 'nightly', builderNames = builderNames['full'], hour = common.config['bot']['nightlyHours'], minute = common.config['bot']['nightlyMinutes']) c['schedulers'].append(schedulerNightly) ############################################################################# ####### STATUS TARGETS from buildbot.status import html # 'status' is a list of Status Targets. c['status'] = [] c['status'].append( html.WebStatus( http_port = common.config['bot']['httpPort'], allowForce=True)) # IRC bot configuration: # Nickname: bbgdal # Password: gdal2007 from buildbot.status import words c['status'].append( words.IRC( host='irc.freenode.net', nick='bb' + common.config['bot']['name'], channels=['#' + common.config['bot']['name']], password='gdal2007')) # Mail Notifications from buildbot.status.mail import MailNotifier c['status'].append( MailNotifier( fromaddr="svn_gdal@osgeo.org", sendToInterestedUsers=False, extraRecipients=[], mode='failing', subject='[%(projectName)s Buildbot] %(result)s on %(builder)s')) ############################################################################# ####### PROJECT IDENTITY c['slavePortnum'] = common.config['bot']['slavePort'] # The 'projectName' string will be used to describe the project that this # buildbot is working on. c['projectName'] = common.config['project']['name'] c['projectURL'] = common.config['project']['url'] # The 'buildbotURL' string should point to the location where the buildbot's # internal web server (usually the html.WebStatus page) is visible. botURL = '%s:%d/' % (common.config['bot']['url'], common.config['bot']['httpPort']) c['buildbotURL'] = botURL # EOF