1#!/usr/bin/env python
2# -*- python -*-
3# vim: syntax=python
4import time
5import itertools
6### basis for the revision string
7base_rev_major = "0."
8base_rev = base_rev_major
9master_repo = 'git://github.com/springlobby/springlobby.git'
10master_repo_rw = 'git@github.com:springlobby/springlobby.git'
11
12active_devs = {'koshi': 'git://github.com/renemilk/springlobby.git',
13		'abma': 'git://github.com/abma/springlobby.git'}
14
15WIN_STRIP="/opt/mingw32/usr/bin/i686-pc-mingw32-strip"
16WIN_EXE_DIR="build-msw-default/src/"
17
18c = BuildmasterConfig = {}
19c['slaves'] = []
20c['builders'] = []
21c['schedulers'] = []
22c['status'] = []
23
24####### BUILDSLAVES
25
26from buildbot.buildslave import BuildSlave
27from spring import SpringNotifier
28
29#import the pw vars from another file. this way we can keep config in git
30import pw
31
32#c['slaves'].append(BuildSlave("testbot", pw.my_pw, max_builds=1))
33c['slaves'].append(BuildSlave("release-slave", pw.release_slave_pw, max_builds=1))
34c['slaves'].append(BuildSlave("koshi-springlobby-slave", pw.koshi_springlobby_slave_pw, max_builds=1))
35c['slaves'].append(BuildSlave("koshi-springlobby-slave2", pw.koshi_springlobby_slave2_pw, max_builds=1))
36c['slaves'].append(BuildSlave("documentation", pw.documentation_pw, max_builds=1))
37#c['slaves'].append(BuildSlave("macosx1", pw.mac_pw, max_builds=1))
38c['slavePortnum'] = 9989
39
40### CONFIGS
41
42commom_win_opts = [
43		'-DOPTION_SOUND=ON',
44		'-DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32_static.cmake',
45		'-DCMAKE_BUILD_TYPE=RelWithDebInfo',
46		'-DAUX_VERSION=msw',
47		'-DENABLE_DEBUG_REPORT=ON',
48		'-DCMAKE_EXE_LINKER_FLAGS:STRING=-L/opt/mingw32/lib',
49		'-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING=NEVER',
50		'-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY:STRING=ONLY',
51		'-DCMAKE_FIND_ROOT_PATH:PATH=/opt/mingw32/usr/i686-pc-mingw32',
52		'-DCMAKE_SYSTEM_NAME:STRING=Windows',
53		'-DBoost_THREADAPI:STRING=win32',
54		'-DCMAKE_RC_COMPILER:PATH=/opt/mingw32/usr/bin/i686-pc-mingw32-windres',
55		'-DCMAKE_C_COMPILER:PATH=/opt/mingw32/usr/bin/i686-pc-mingw32-gcc',
56		'-DCMAKE_CXX_COMPILER:PATH=/opt/mingw32/usr/bin/i686-pc-mingw32-g++',
57	]
58no_opti  = ['-DCMAKE_CXX_FLAGS:STRING=-O0']
59common_nix_opts = []
60build_configs = dict() # name -> options_string
61build_configs['msw-default']  =  commom_win_opts + ['-DCMAKE_CXX_FLAGS:STRING=-DNDEBUG']
62build_configs['msw-debug']  =  commom_win_opts  + ['-DCMAKE_BUILD_TYPE=DEBUG', '-DCMAKE_CXX_FLAGS:STRING=-g3 -ggdb -O0']
63build_configs['msw-no-optionals']  = commom_win_opts + no_opti
64
65build_configs['linux-default']  = no_opti + common_nix_opts
66build_configs['linux-no-optionals']  = ['-DCMAKE_BUILD_TYPE=PROFILE'] + no_opti + common_nix_opts
67
68common_mac_opts = "-DCMAKE_TOOLCHAIN_FILE:STRING=../cmake/Toolchain-osx.cmake"
69#build_configs['osx-default'] = ' ' + common_mac_opts
70#builds with extra env file sourced
71build_env_configs = dict() # name -> options_string
72#disabled cause compiler segfaults
73#build_env_configs['gcc-svn-linux-default']  = "-DCMAKE_CXX_COMPILER=/opt/gcc-svn/bin/g++ -DCMAKE_C_COMPILER=/opt/gcc-svn/bin/gcc -DCMAKE_LINKER=/opt/gcc-svn/bin/ld" + no_opti + common_nix_opts
74build_env_configs['wx2.9-linux-default']  = no_opti + common_nix_opts
75build_env_configs['clang-linux-default']  = [
76			'-DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++',
77			'-DCMAKE_C_COMPILER=/opt/llvm/bin/clang',
78			'-DCMAKE_LINKER=/opt/llvm/bin/llvm-ld' ] + no_opti + common_nix_opts
79env_builds = [ ]
80#env_builds.append( ( "/opt/gcc-svn.PATH", "gcc-svn-linux-default" ) )
81env_builds.append( ( "/opt/wx2.9.PATH", "wx2.9-linux-default" ) )
82env_builds.append( ( "/opt/llvm.PATH", "clang-linux-default" ) )
83
84####### CHANGESOURCES
85
86def changeIsImportant(change):
87	for name in change.files:
88		if (name.endswith('.cpp') or name.endswith('.c') or
89		    name.endswith('.hpp') or name.endswith('.h') or
90		    name.endswith('.cmake') or name.endswith('.hh') or
91		    name.endswith('.inl') or name.endswith('CMakeLists.txt')):
92			return True
93	return False
94
95from buildbot.changes.pb import PBChangeSource
96c['change_source'] = PBChangeSource()
97
98####### SCHEDULERS
99
100from buildbot.schedulers.filter import ChangeFilter
101from buildbot.schedulers.basic import AnyBranchScheduler as Scheduler
102from buildbot.schedulers.forcesched import ForceScheduler
103from buildbot.schedulers import timed
104
105for name in active_devs.keys():
106	c['schedulers'].append(Scheduler(
107	      name="%s_Scheduler"%name,
108	      change_filter=ChangeFilter(category_re = '.*%s.*'%name),
109	      treeStableTimer=60,
110	      fileIsImportant=changeIsImportant,
111	      builderNames=[name]))
112	      #builderNames=[name,'%s-osx'%name]))
113	#the osx build is delayed so trivial fails in the default builder may be corrected before it's started
114	#c['schedulers'].append(Scheduler(
115	#      name="%s-osx_Scheduler"%name,
116	#      change_filter=ChangeFilter(category_re = '.*%s.*'%name),
117	#      fileIsImportant=changeIsImportant,
118	#      treeStableTimer=6*60,
119	#      builderNames=['%s-osx'%name]))
120#c['schedulers'].append(timed.Nightly(
121#	name='nightly_sched',
122#	branch='master',
123#	fileIsImportant=changeIsImportant,
124#	onlyIfChanged=True,
125#	builderNames=["buildbot-osx"  ], hour=5, minute=0))
126c['schedulers'].append(ForceScheduler(
127	name='force_sched',
128	builderNames=["docs", "release"  ] + ['{}{}'.format(x,f) for (x,f) in itertools.product(active_devs.keys(), ['', '-win_debug', '-win'])] ))
129
130
131####### BUILDERS
132
133from buildbot.process.factory import BuildFactory
134from buildbot.steps.source import Git
135from buildbot.steps.shell import Compile, ShellCommand, WithProperties
136
137class SyncSubmodules(ShellCommand) :
138	name = "syncsubmodules"
139	description = 'syncing .gitmodules with .git/config'
140	descriptionDone = 'synced submodule paths'
141	command = ['git', 'submodule', 'sync']
142
143class InitSubmodules(ShellCommand) :
144	name = "submodules"
145	description = 'updating submodules'
146	descriptionDone = 'updated submodules'
147	command = ['git', 'submodule', 'update', '--init']
148
149class BuildDocs(ShellCommand) :
150	name = "execute doxygen"
151	description = ["generating doxygen documentation"]
152	descriptionDone = ["docs generated"]
153	command = ["/bin/sh","./tools/update-docs.sh"]
154
155class UploadTranslations(ShellCommand) :
156	name = "UploadTranslations"
157	description = ["Upload translations"]
158	descriptionDone = ["translations uploaded"]
159	command = ["sl-update-translations","po/springlobby.pot"]
160
161class StripWindowsInstaller(ShellCommand) :
162	name = "stripping installer files"
163	description = ["stripping installer files"]
164	descriptionDone = ["installer files stripped"]
165	command = [WIN_STRIP,WIN_EXE_DIR + "/updater/springlobby_updater.exe" , WIN_EXE_DIR + "/springsettings/springsettings.exe" ,WIN_EXE_DIR + "/springlobby.exe" ]
166
167class WindowsInstaller(ShellCommand) :
168	name = "putting installer files"
169	description = ["putting installer files"]
170	descriptionDone = ["installer files copied"]
171	command = ["install","--mode=755",WIN_EXE_DIR + "/updater/springlobby_updater.exe" ,WIN_EXE_DIR + "/springsettings/springsettings.exe" ,WIN_EXE_DIR + "/springlobby.exe", "/data/www/springlobby.info/installer/" ]
172
173class WindowsBinary(ShellCommand) :
174	name = "windows binary"
175	description = ["making windows binary"]
176	descriptionDone = ["windows binary"]
177	command = ["zip", "-jr", WithProperties("build-msw-default/springlobby-"+base_rev+"%(buildnumber)s-win32.zip"), "build-msw-default/wininst"]
178
179class WindowsLocales(ShellCommand) :
180	name = "windows locale"
181	description = ["adding locales to win zip"]
182	descriptionDone = ["windows locale added"]
183	command = ["/bin/sh", "./tools/buildbot-add-locale-win-zip.sh", WithProperties("springlobby-"+base_rev+"%(buildnumber)s-win32.zip")]
184
185class ReleaseWin(ShellCommand) :
186	name = "release windows binary"
187	description = ["releasing windows binary"]
188	descriptionDone = ["windows binary release"]
189	command = ["/usr/bin/install","-t", "/data/www/springlobby.info/windows/", WithProperties("build-msw-default/springlobby-"+base_rev+"%(buildnumber)s-win32.zip")]
190
191class ReleaseTarball(ShellCommand) :
192	name = "release tarball"
193	description = ["releasing tarball"]
194	descriptionDone = ["tarball release"]
195	command = ["/usr/bin/install", "-t", "/data/www/springlobby.info/tarballs/", WithProperties("build-linux-default/springlobby-"+base_rev+"%(buildnumber)s.tar.gz"), WithProperties("build-linux-default/springlobby-"+base_rev+"%(buildnumber)s.tar.bz2")]
196
197class RsyncStuff(ShellCommand) :
198	name = "RSYNC stuff"
199	description = ["rsycn tarball and windows zip"]
200	descriptionDone = ["rsync done"]
201	command =["rsync", "-lrvz", "/data/www/springlobby.info/", "kosh@springlobby.info:/data/www/springlobby.info/"]
202
203class GitTag(ShellCommand) :
204	name = "git tag"
205	description = "git tagging"
206	descriptionDone = "git tag"
207	command = ["git","tag", "-a", "-m", WithProperties(base_rev+"%(buildnumber)s"),  WithProperties(base_rev+"%(buildnumber)s")]
208
209class ReportNews(ShellCommand) :
210	name = "report"
211	description = "report"
212	descriptionDone = "reported"
213	command = ["/usr/local/bin/sl_report.py", WithProperties(base_rev+"%(buildnumber)s")]
214
215class LatestZip(ShellCommand) :
216	name = "latest zip"
217	description = "latest zip"
218	descriptionDone = "latest zip"
219	command = ["/data/www/springlobby.info/windows/latest.sh", WithProperties(base_rev+"%(buildnumber)s")]
220
221class PublishVersion(ShellCommand) :
222	name = "publish version number"
223	description = "publishing version"
224	descriptionDone = "published version"
225	command = ["/bin/bash", "-c", WithProperties("echo "+base_rev+"%(buildnumber)s > /data/www/springlobby.info/version/current.txt")]
226
227# TODO osc needs user/pass for opensuse build service
228# but of course we can't set them here, so you have to do it manually the first time
229class UpdateRPM(ShellCommand) :
230	name = "update rpm"
231	description = "updating rpm"
232	descriptionDone = "updated rpm"
233	command = ["/bin/bash", "./tools/update-rpm.sh", WithProperties(base_rev+"%(buildnumber)s")]
234
235class UpdateEbuild(ShellCommand) :
236	name = "update ebuild"
237	description = "updating ebuild"
238	descriptionDone = "updated ebuild"
239	command = ["/bin/bash", "./tools/update-ebuilds.sh", WithProperties(base_rev+"%(buildnumber)s")]
240
241class UpdateTranslations(ShellCommand) :
242	name = "update translations"
243	description = "updating translations"
244	descriptionDone = "updated translations"
245	command = ["/bin/bash", "./tools/update-translations-buildbot.sh"]
246
247class UploadBundle(ShellCommand) :
248	name = "upload bundle"
249	def __init__(self, configname='osx-default',who='buildbot',**kwargs):
250		self.configname = configname
251		self.who 		= who
252		ShellCommand.__init__(self, **kwargs)
253
254		#mandatory for later (automatic) re-creation of step object
255		self.addFactoryArguments(configname = configname)
256		self.addFactoryArguments(who= who)
257		self.description = "uploading bundle"
258		self.descriptionDone = "uploaded bundle"
259		self.command = ["/bin/bash", "./tools/upload-macosx-build.sh", "build-%s"%configname, self.who, WithProperties("%s","branch")]
260
261class UploadTempBuild(ShellCommand) :
262	name = "upload exe"
263	def __init__(self, configname='linux-default',who='koshi',**kwargs):
264		self.configname = configname
265		self.who 		= who
266		ShellCommand.__init__(self, **kwargs)
267
268		#mandatory for later (automatic) re-creation of step object
269		self.addFactoryArguments(configname = configname)
270		self.addFactoryArguments(who= who)
271		self.description = "uploading exe"
272		self.descriptionDone = "uploaded exe"
273		self.command = ["/bin/bash", "./tools/upload-temp-win-build.sh", "build-%s"%configname, self.who, WithProperties("%s","branch")]
274
275class UploadTempDebugBuild(ShellCommand) :
276	name = "upload exe"
277	def __init__(self, configname='linux-default', who='koshi', **kwargs):
278		self.configname = configname
279		self.who 		= who
280		ShellCommand.__init__(self, **kwargs)
281
282		#mandatory for later (automatic) re-creation of step object
283		self.addFactoryArguments(configname = configname)
284		self.addFactoryArguments(who= who)
285		self.description = "uploading exe"
286		self.descriptionDone = "uploaded exe"
287		self.command = ["/bin/bash", "./tools/upload-temp-win-build_debug.sh", "build-%s"%configname, self.who, WithProperties("%s","branch")]
288
289class AnnounceBuild(ShellCommand) :
290	name = "announce"
291	def __init__(self, who,**kwargs):
292		self.who = who
293		ShellCommand.__init__(self, **kwargs)
294		self.addFactoryArguments(who= who)
295		self.description = "announce build in #springlobby"
296		self.descriptionDone = "announced"
297		self.command = ["/usr/local/bin/sl_announce.py", who]
298
299# common build config steps ---------------------------------------------@
300class buildConfig(Compile):
301	name = 'buildConfig'
302	def __init__(self, configname='linux-default',jobs=1,release=False,**kwargs):
303		self.configname = configname
304		self.release = release
305		Compile.__init__(self, **kwargs)
306		self.haltOnFailure = True
307
308		#mandatory for later (automatic) re-creation of step object
309		self.addFactoryArguments(configname = configname)
310		self.addFactoryArguments(jobs = jobs)
311		self.addFactoryArguments(release= release)
312
313		#self.name 			= self.configname + " build"
314		self.description 	= ["building " + self.configname + " config"]
315		self.descriptionDone	= ["built " + self.configname + " config"]
316		if self.release:
317			self.command		= ['make' ,'BUILDBOT_RELEASE=1','-k', '-j%d'%jobs, '-C', 'build-%s'%(self.configname)]
318		else:
319			self.command		= ['make' ,'-k', '-j%d'%jobs, '-C', 'build-%s'%(self.configname)]
320
321class buildEnvConfig(Compile):
322	name = 'buildConfig'
323	def __init__(self, env_file,configname,jobs=1,release=False,**kwargs):
324		self.configname = configname
325		self.release = release
326		self.env_file = env_file
327		Compile.__init__(self, **kwargs)
328		self.haltOnFailure = True
329
330		#mandatory for later (automatic) re-creation of step object
331		self.addFactoryArguments(configname = configname)
332		self.addFactoryArguments(jobs = jobs)
333		self.addFactoryArguments(release= release)
334		self.addFactoryArguments(env_file= env_file)
335		if 'gcc-svn' in configname:
336			self.addFactoryArguments(flunkOnFailure=False)
337			self.addFactoryArguments(haltOnFailure=False)
338
339		#self.name 			= self.configname + " build"
340		self.description 	= ["building " + self.configname + " config"]
341		self.descriptionDone	= ["built " + self.configname + " config"]
342		if self.release:
343			self.command		= ' '.join(['source', self.env_file, '&&', 'make' ,'BUILDBOT_RELEASE=1','-k', '-j%d'%jobs, '-C', 'build-%s'%(self.configname)])
344		else:
345			self.command		= ' '.join(['source', self.env_file, '&&', 'make' ,'-k', '-j%d'%jobs, '-C', 'build-%s'%(self.configname)])
346
347# TODO fail and stop the build if this fails
348class CreateBuildDir(ShellCommand) :
349	name = "build dir create"
350
351	def __init__(self, configname='linux-default',**kwargs):
352		self.configname = configname
353		ShellCommand.__init__(self, **kwargs)
354
355		#mandatory for later (automatic) re-creation of step object
356		self.addFactoryArguments(configname = configname)
357		self.haltOnFailure = True
358
359		self.description = ["creating dir %s"%(self.configname)]
360		self.descriptionDone = ["%s dir created"%(self.configname)]
361		self.command = ["/bin/bash", "./buildbot/create-build-dirs.sh", self.configname, WithProperties(base_rev+"%(buildnumber)s") , ] + build_configs[self.configname]
362class CreateEnvBuildDir(ShellCommand) :
363	name = "build dir create"
364
365	def __init__(self, env_file,configname='linux-default',**kwargs):
366		self.configname = configname
367		self.env_file = env_file
368		ShellCommand.__init__(self,**kwargs)
369
370		#mandatory for later (automatic) re-creation of step object
371		self.addFactoryArguments(configname = configname)
372		self.addFactoryArguments(env_file= env_file)
373		self.haltOnFailure = True
374
375		self.description = ["creating dir %s"%(self.configname)]
376		self.descriptionDone = ["%s dir created"%(self.configname)]
377		self.command = ["source", self.env_file, "&&", "/bin/bash", "./buildbot/create-build-dirs.sh", self.configname, str(time.time()), build_env_configs[self.configname]]
378# common build config steps ---------------------------------------------@
379JOBS='-j2'
380ft = BuildFactory()
381ft.addStep(Git(repourl=master_repo))
382ft.addStep( SyncSubmodules() )
383ft.addStep( InitSubmodules() )
384for i in ['linux-default','msw-default']:
385	ft.addStep(CreateBuildDir(i))
386	ft.addStep( buildConfig(configname=i,jobs=2,release=True) )
387ft.addStep(Compile(command=["make", 'BUILDBOT_RELEASE=1',JOBS, "-k", "-C", "build-linux-default", "distcheck"]))
388ft.addStep(Compile(command=["make", 'BUILDBOT_RELEASE=1',JOBS, "-C", "build-msw-default", "pack"]))
389ft.addStep(ReleaseTarball())
390ft.addStep(ReleaseWin())
391ft.addStep(GitTag())
392ft.addStep(ShellCommand(command=["git","push", "--tags", master_repo_rw]))
393ft.addStep(ShellCommand(command=["git","push", master_repo_rw, "master"]))
394ft.addStep(StripWindowsInstaller())
395ft.addStep(WindowsInstaller())
396ft.addStep(PublishVersion())
397#ft.addStep(UpdateRPM())
398#ft.addStep(UpdateEbuild())
399#ft.addStep(UploadTranslations())
400ft.addStep(ReportNews())
401ft.addStep(LatestZip())
402
403
404bt = {'name': "release",
405      'slavenames': ["release-slave"],
406      'builddir': "release",
407      'factory': ft,
408      }
409c['builders'].append(bt)
410
411f2 = BuildFactory()
412f2.addStep(Git(repourl=master_repo))
413f2.addStep(BuildDocs())
414
415b2 = {'name': "docs",
416      'slavename': "documentation",
417      'builddir': "docs",
418      'factory': f2,
419      }
420c['builders'].append(b2)
421
422class FullBuildFactory(BuildFactory):
423	def __init__(self,dude):
424		BuildFactory.__init__(self)
425		self.addStep(Git(repourl=active_devs[dude]))
426		self.addStep( SyncSubmodules() )
427		self.addStep( InitSubmodules() )
428		for name in set(build_configs.keys()) - set(['osx-default']):
429			self.addStep( CreateBuildDir(name) )
430			self.addStep( buildConfig(configname=name,jobs=2) )
431		for env in env_builds:
432			self.addStep( CreateEnvBuildDir(env[0],env[1]) )
433			self.addStep( buildEnvConfig(env[0],env[1],jobs=2) )
434		self.addStep(Compile(command=["make", "-j2","-C", "build-linux-default", "distcheck"]))
435class TestBuildFactory(BuildFactory):
436	def __init__(self,dude):
437		BuildFactory.__init__(self)
438		self.addStep(Git(repourl=active_devs[dude]))
439		self.addStep( SyncSubmodules() )
440		self.addStep( InitSubmodules() )
441		for env in env_builds:
442			self.addStep( CreateEnvBuildDir(env[0],env[1]) )
443			self.addStep( buildEnvConfig(env[0],env[1],jobs=2) )
444
445class WinTempBuildFactory(BuildFactory):
446	def __init__(self, who):
447		BuildFactory.__init__(self)
448		self.addStep(Git(repourl=active_devs[who]))
449		self.addStep( SyncSubmodules() )
450		self.addStep( InitSubmodules() )
451		self.addStep( CreateBuildDir('msw-default') )
452		self.addStep( buildConfig(configname='msw-default',jobs=2) )
453		self.addStep(UploadTempBuild(configname='msw-default',who=who  ))
454		self.addStep(AnnounceBuild( who  ))
455
456class WinTempDebugBuildFactory(BuildFactory):
457	def __init__(self, who):
458		BuildFactory.__init__(self)
459		self.addStep(Git(repourl=active_devs[who]))
460		self.addStep( SyncSubmodules() )
461		self.addStep( InitSubmodules() )
462		self.addStep( CreateBuildDir('msw-debug') )
463		self.addStep( buildConfig(configname='msw-debug',jobs=2) )
464		self.addStep(UploadTempDebugBuild(configname='msw-debug',who=who  ))
465		self.addStep(AnnounceBuild( who  ))
466
467class OSXBuildFactory(BuildFactory):
468	def __init__(self, who):
469		BuildFactory.__init__(self)
470		self.addStep(Git(repourl=active_devs[who]))
471		self.addStep( SyncSubmodules() )
472		self.addStep( InitSubmodules() )
473		self.addStep( CreateBuildDir('osx-default') )
474		self.addStep( buildConfig(configname='osx-default',jobs=1) )
475		self.addStep(UploadBundle(configname='osx-default',who=who  ))
476		#self.addStep(AnnounceBuild( who  ))
477
478for name in active_devs.keys():
479	c['builders'].append({'name': name,
480      'slavenames': ["release-slave"],
481      'builddir': name,
482      'factory': FullBuildFactory(name)
483     })
484	c['builders'].append({'name': name+'-win',
485      'slavenames': ["release-slave"],
486      'builddir': name+'-win',
487      'factory': WinTempBuildFactory(name)
488     })
489	c['builders'].append({'name': name+'-win_debug',
490      'slavenames': ["release-slave"],
491      'builddir': name+'-win_debug',
492      'factory': WinTempDebugBuildFactory(name)
493     })
494	#c['builders'].append({'name': name+'-osx',
495      #'slavenames': ["macosx1"],
496      #'builddir': name+'-osx',
497      #'factory': OSXBuildFactory(name)
498     #})
499#c['builders'].append({'name': 'buildbot-osx',
500      #'slavenames': ["macosx1"],
501      #'builddir': 'buildbot-osx',
502      #'factory': OSXBuildFactory('buildbot')
503     #})
504
505class DummyFactory(BuildFactory):
506	def __init__(self, who):
507    		BuildFactory.__init__(self)
508		self.addStep(Git(repourl=master_repo))
509		self.addStep( SyncSubmodules() )
510		self.addStep( InitSubmodules() )
511		self.addStep(UploadTranslations())
512
513b00 = {'name': "dummy",
514      'slavenames': ["release-slave"],
515      'builddir': "dummy",
516      'factory': DummyFactory("koshi")
517     }
518#c['builders'].append(b00)
519
520
521####### STATUS TARGETS
522from buildbot.status.html import WebStatus
523from buildbot.status.web.authz import Authz
524from buildbot.status.web.auth import HTPasswdAuth
525auth = (HTPasswdAuth('/home/buildbot/.htpasswd'))
526authz = Authz(auth=auth,
527	forceBuild='auth', # only authenticated users
528	pingBuilder=True, # but anyone can do this
529)
530c['status'].append(WebStatus(http_port=8010, authz=authz))
531
532#from buildbot.status import words
533#c['status'].append(words.IRC(host="orwell.freenode.net", nick="springlobby",
534#                             channels=["#springlobby"]))
535
536from buildbot.status import client
537c['status'].append(client.PBListener(9988))
538
539from buildbot.status.mail import MailNotifier
540#mn = MailNotifier(fromaddr="koshi@springlobby.info",builders=['release'],
541#                       sendToInterestedUsers=False,
542#                       extraRecipients=['releases@www.springlobby.info'])
543bnames = ['koshi-win_dbg','dummy','tc','koshi','release','docs','BrainDamage','bd-win',
544	'tobi','olemars','koshi-win_dbg','koshi-full','koshi-win','olemars-win','tc-win']
545mn = SpringNotifier( builders=bnames,mode='all')
546c['status'].append(mn)
547
548####### DEBUGGING OPTIONS
549
550#c['debugPassword'] = "debugpassword"
551#c['manhole'] = buildbot.manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", "admin", "password")
552
553####### PROJECT IDENTITY
554
555c['projectName'] = "SpringLobby"
556c['projectURL'] = "http://springlobby.info/"
557c['buildbotURL'] = "http://buildbot.springlobby.info/"
558