Updtae buildbot's master.vfg
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 1 Jun 2013 10:18:47 +0000 (10:18 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 1 Jun 2013 10:18:47 +0000 (10:18 +0000)
build_files/buildbot/master.cfg

index 3cfea2a3abdc9f7d7baac57a8e7668165823b44f..529b4e483b4365ace221bfbd6d62b7bf5a7a3869 100644 (file)
@@ -28,8 +28,39 @@ c['slavePortnum'] = 9989
 from buildbot.changes.svnpoller import SVNPoller
 
 c['change_source'] = SVNPoller(
 from buildbot.changes.svnpoller import SVNPoller
 
 c['change_source'] = SVNPoller(
-    'https://svn.blender.org/svnroot/bf-blender/trunk/',
-    pollinterval=1200)
+       'https://svn.blender.org/svnroot/bf-blender/trunk/',
+       pollinterval=1200)
+
+# SCHEDULERS
+#
+# Decide how to react to incoming changes.
+
+# from buildbot.scheduler import Scheduler
+from buildbot.schedulers import timed
+
+c['schedulers'] = []
+
+def schedule_build(name, hour, minute=0):
+    c['schedulers'].append(timed.Nightly(name='nightly ' + name,
+        builderNames=[name],
+        hour=hour,
+        minute=minute))
+
+"""
+schedule_cycle = 4
+
+for i in range(0, schedule_cycle):
+    names = []
+    for j in range(0, len(buildernames)):
+        if j % schedule_cycle == i:
+            names += [buildernames[j]]
+
+    print(names)
+    c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
+        builderNames=names,
+        hour=3+i,
+        minute=0))
+"""
 
 # BUILDERS
 #
 
 # BUILDERS
 #
@@ -53,7 +84,7 @@ c['builders'] = []
 buildernames = []
 
 
 buildernames = []
 
 
-def add_builder(c, name, libdir, factory, branch='', rsync=False):
+def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute=0):
     slavenames = []
 
     for slave in master_private.slaves:
     slavenames = []
 
     for slave in master_private.slaves:
@@ -65,6 +96,8 @@ def add_builder(c, name, libdir, factory, branch='', rsync=False):
         c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
         buildernames.append(name)
 
         c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
         buildernames.append(name)
 
+        schedule_build(name, hour, minute)
+
 # common steps
 
 
 # common steps
 
 
@@ -74,11 +107,9 @@ def svn_step(branch=''):
     else:
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
     else:
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
-
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
-
 def rsync_step(id, branch, rsync_script):
     return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
 
 def rsync_step(id, branch, rsync_script):
     return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
 
@@ -112,54 +143,20 @@ def generic_builder(id, libdir='', branch='', rsync=False):
 
 # builders
 
 
 # builders
 
-add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, '', True)
-add_builder(c, 'mac_x86_64_10_5_scons', '', generic_builder, '', True)
-#add_builder(c, 'salad_mac_x86_64_scons', 'darwin-9.x.universal', generic_builder, 'soc-2011-salad')
-add_builder(c, 'mac_i386_scons', 'darwin-9.x.universal', generic_builder)
-add_builder(c, 'mac_ppc_scons', 'darwin-9.x.universal', generic_builder)
-#add_builder(c, 'linux_x86_64_cmake', '', generic_builder)
-#add_builder(c, 'linux_glibc27_i386_scons', '', generic_builder)
-add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder)
-#add_builder(c, 'salad_linux_i386_scons', '', generic_builder, 'soc-2011-salad')
-#add_builder(c, 'linux_glibc27_x86_64_scons', '', generic_builder)
-add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder)
-#add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 'soc-2011-salad')
-add_builder(c, 'win32_scons', 'windows', generic_builder)
-#add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 'soc-2011-salad')
-add_builder(c, 'win64_scons', 'win64', generic_builder)
-add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder)
-add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder)
-#add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
-#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)
-
-# SCHEDULERS
-#
-# Decide how to react to incoming changes.
-
-# from buildbot.scheduler import Scheduler
-from buildbot.schedulers import timed
-
-c['schedulers'] = []
-#c['schedulers'].append(Scheduler(name="all", branch=None,
-#                                 treeStableTimer=None,
-#                                 builderNames=[]))
-#c['schedulers'].append(timed.Periodic(name="nightly",
-#                        builderNames=buildernames,
-#                        periodicBuildTimer=24*60*60))
-
-schedule_cycle = 4
-
-for i in range(0, schedule_cycle):
-    names = []
-    for j in range(0, len(buildernames)):
-        if j % schedule_cycle == i:
-            names += [buildernames[j]]
-
-    print(names)
-    c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
-                                         builderNames=names,
-                                         hour=3 + i,
-                                         minute=0))
+add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=5)
+add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
+add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
+add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
+add_builder(c, 'win32_scons', 'windows', generic_builder, hour=1)
+add_builder(c, 'win64_scons', 'win64', generic_builder, hour=2)
+#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
+add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
+#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
+#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)
+
+# Multiview branch
+add_builder(c, 'multiview_win64_scons', 'win64', generic_builder, 'multiview', hour=4)
+add_builder(c, 'multiview_win32_scons', 'windows', generic_builder, 'multiview', hour=5)
 
 # STATUS TARGETS
 #
 
 # STATUS TARGETS
 #
@@ -171,17 +168,23 @@ c['status'] = []
 
 from buildbot.status import html
 from buildbot.status.web import authz
 
 from buildbot.status import html
 from buildbot.status.web import authz
+from buildbot.status.web import auth
+
+users = []
+for slave in master_private.slaves:
+    users += [(slave['name'], slave['password'])]
 
 authz_cfg = authz.Authz(
 
 authz_cfg = authz.Authz(
+    auth=auth.BasicAuth(users),
     # change any of these to True to enable; see the manual for more
     # options
     gracefulShutdown=False,
     # change any of these to True to enable; see the manual for more
     # options
     gracefulShutdown=False,
-    forceBuild=True,  # use this to test your slave once it is set up
+    forceBuild='auth',  # use this to test your slave once it is set up
     forceAllBuilds=False,
     pingBuilder=False,
     forceAllBuilds=False,
     pingBuilder=False,
-    stopBuild=True,
+    stopBuild='auth',
     stopAllBuilds=False,
     stopAllBuilds=False,
-    cancelPendingBuild=True,
+    cancelPendingBuild='auth',
 )
 
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
 )
 
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))