# -*- python -*- # ex: set syntax=python: # ############################################################################# # master.cfg - Configuration file for libLAS 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='maink' c['schedulers'] = [] c['builders'] = [] # Collection binding builders to schedulers by name builderNames = {} builderNames['quick'] = [] builderNames['full'] = [] builderNames['full-geotiff'] = [] builderNames['full-spatialindex'] = [] builderNames['full-cmake'] = [] builderNames['full-gdal'] = [] 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 = 8*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) #### FULL + GeoTIFF if builderNames.has_key('full-geotiff') is True: schedulerFullGTiff = Scheduler(name = 'full-geotiff', builderNames = builderNames['full-geotiff'], branch=None, treeStableTimer=240*60+30) c['schedulers'].append(schedulerFullGTiff) #### FULL + SpatialIndex if builderNames.has_key('full-spatialindex') is True: schedulerFullSpatialIndex = Scheduler(name = 'full-spatialindex', builderNames = builderNames['full-spatialindex'], branch=None, treeStableTimer=240*60+45) c['schedulers'].append(schedulerFullSpatialIndex) #### FULL + GDAL if builderNames.has_key('full-gdal') is True: schedulerFullSpatialIndex = Scheduler(name = 'full-gdal', builderNames = builderNames['full-gdal'], branch=None, treeStableTimer=240*60+55) c['schedulers'].append(schedulerFullSpatialIndex) #### FULL + CMake if builderNames.has_key('full-cmake') is True: schedulerFull = Scheduler(name = 'full-cmake', builderNames = builderNames['full-cmake'], branch=None, treeStableTimer=360*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: bbliblas # Password: liblas#20090401 # E-mail: liblas-devel@lists.osgeo.org, mateusz@loskot.net from buildbot.status import words c['status'].append( words.IRC( host='irc.freenode.net', nick='bb' + common.config['bot']['name'], channels=['#liblas'], password='liblas#20090401')) ############################################################################# ####### 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.WebStatuspage) is visible. botURL = '%s:%d/' % (common.config['bot']['url'], common.config['bot']['httpPort']) c['buildbotURL'] = botURL