Next: , Previous: Merging BuildRequests, Up: Global Configuration

4.5.7 Prioritizing Builders

By default, buildbot will attempt to start builds on builders in order from the builder with the oldest pending request to the newest. This behaviour can be customized with the c['prioritizeBuilders'] configuration key. This key specifies a function which is called with two arguments: a BuildMaster and a list of Builder objects. It should return a list of Builder objects in the desired order. It may also remove items from the list if builds should not be started on those builders.

This parameter controls the order in which builders are activated. It does not affect the order in which a builder processes the build requests in its queue. For that purpose, see see Prioritizing Builds.

     def prioritizeBuilders(buildmaster, builders):
         """Prioritize builders.  'finalRelease' builds have the highest
         priority, so they should be built before running tests, or
         creating builds."""
         builderPriorities = {
             "finalRelease": 0,
             "test": 1,
             "build": 2,
         builders.sort(key=lambda b: builderPriorities.get(, 0))
         return builders
     c['prioritizeBuilders'] = prioritizeBuilders