Merge branch 'buildbot-0.9.X' into master.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 21 Dec 2018 11:57:02 +0000 (12:57 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 21 Dec 2018 11:57:02 +0000 (12:57 +0100)
1  2 
master.cfg
master_unpack.py

diff --cc master.cfg
@@@ -4,56 -4,16 +4,16 @@@
  # <pep8 compliant>
  
  # List of the branches being built automatically overnight
 -NIGHT_SCHEDULE_BRANCHES = [None, "blender2.8"]
 +NIGHT_SCHEDULE_BRANCHES = [None, "blender2.7"]
  
  # List of the branches available for force build
 -FORCE_SCHEDULE_BRANCHES = ["master", "blender2.8", "experimental-build"]
 +FORCE_SCHEDULE_BRANCHES = ["master", "blender2.7", "experimental-build"]
  
- """
- Stock Twisted directory lister doesn't provide any information about last file
- modification time, we hack the class a bit in order to have such functionaliity
- :)
- """
- from buildbot.status.web.base import DirectoryLister
- def get_files_and_directories(self, directory):
-     from twisted.web.static import (getTypeAndEncoding,
-                                     formatFileSize)
-     import urllib
-     import cgi
-     import time
-     import os
-     files = []
-     dirs = []
-     for path in directory:
-         url = urllib.quote(path, "/")
-         escapedPath = cgi.escape(path)
-         lastmodified = time.ctime(os.path.getmtime(
-             os.path.join(self.path, path)))
-         if os.path.isdir(os.path.join(self.path, path)):
-             url = url + '/'
-             dirs.append({'text': escapedPath + "/", 'href': url,
-                          'size': '', 'type': '[Directory]',
-                          'encoding': '',
-                          'lastmodified': lastmodified})
-         else:
-             mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
-                                                     self.contentEncodings,
-                                                     self.defaultType)
-             try:
-                 size = os.stat(os.path.join(self.path, path)).st_size
-             except OSError:
-                 continue
-             files.append({
-                 'text': escapedPath, "href": url,
-                 'type': '[%s]' % mimetype,
-                 'encoding': (encoding and '[%s]' % encoding or ''),
-                 'size': formatFileSize(size),
-                 'lastmodified': lastmodified})
-     return dirs, files
- DirectoryLister._getFilesAndDirectories = get_files_and_directories
+ # List of branches availble for addons branch selection.
 -ADDONS_BRANCHES = ["master", "blender2.8"]
++ADDONS_BRANCHES = ["master", "blender2.7"]
+ # List of branches availble for libraries branch selection.
+ LIB_BRANCHES = ["trunk"]
  
  # Dictionary that the buildmaster pays attention to.
  c = BuildmasterConfig = {}
@@@ -141,23 -157,33 +157,33 @@@ def schedule_force_build(name)
          properties=[]))
  
  
- def schedule_build(name, hour, minute=0):
+ def schedule_nightly_build(name, hour, minute=0):
+     """
+     Creates scheduler for nightly builds for a given builder.
+     """
      for current_branch in NIGHT_SCHEDULE_BRANCHES:
-         scheduler_name = "nightly " + name
+         scheduler_name = "nightly_" + name
          if current_branch:
              scheduler_name += ' ' + current_branch
 -        # Use special addons submodule branch when building blender2.8 branch.
 +        # Use special addons submodule branch when building blender2.7 branch.
          addons_branch = "master"
 -        if current_branch == "blender2.8":
 -            addons_branch = "blender2.8"
 +        if current_branch == "blender2.7":
 +            addons_branch = "blender2.7"
-         c['schedulers'].append(timed.Nightly(name=scheduler_name,
+         c['schedulers'].append(timed.Nightly(
+             name=scheduler_name,
              codebases={
-                 "blender": {"repository": ""},
-                 "blender-translations": {"repository": "", "branch": "master"},
-                 "blender-addons": {"repository": "", "branch": addons_branch},
-                 "blender-addons-contrib": {"repository": "", "branch": "master"},
-                 "blender-dev-tools": {"repository": "", "branch": "master"},
-                 "lib svn": {"repository": "", "branch": "trunk"}},
+                 "blender": {"repository": "",
+                             "branch": current_branch},
+                 "blender-translations": {"repository": "",
+                                          "branch": "master"},
+                 "blender-addons": {"repository": "",
+                                    "branch": addons_branch},
+                 "blender-addons-contrib": {"repository": "",
+                                            "branch": addons_branch},
+                 "blender-dev-tools": {"repository": "",
+                                       "branch": "master"},
+                 "lib svn": {"repository": "",
+                             "branch": "trunk"}},
              branch=current_branch,
              builderNames=[name],
              hour=hour,
Simple merge