← Back to team overview

yellow team mailing list archive

[Merge] lp:~gary/charms/precise/buildbot-slave/add-max-builds-support into lp:~yellow/charms/oneiric/buildbot-slave/trunk

 

Gary Poster has proposed merging lp:~gary/charms/precise/buildbot-slave/add-max-builds-support into lp:~yellow/charms/oneiric/buildbot-slave/trunk.

Requested reviews:
  Launchpad Yellow Squad (yellow)

For more details, see:
https://code.launchpad.net/~gary/charms/precise/buildbot-slave/add-max-builds-support/+merge/106924

This adds max-builds support for the charm.  It needs buildbot-master support also, available in lp:~gary/charms/precise/buildbot-master/add-max-builds-support .
-- 
https://code.launchpad.net/~gary/charms/precise/buildbot-slave/add-max-builds-support/+merge/106924
Your team Launchpad Yellow Squad is requested to review the proposed merge of lp:~gary/charms/precise/buildbot-slave/add-max-builds-support into lp:~yellow/charms/oneiric/buildbot-slave/trunk.
=== modified file 'config.yaml'
--- config.yaml	2012-05-09 09:23:21 +0000
+++ config.yaml	2012-05-23 01:38:18 +0000
@@ -29,6 +29,12 @@
       The builders that this slave should be a part of. Builders must be
       comma-separated.
     type: string
+  max-builds:
+    description: |
+      The maximum number of builds that this slave can run at once.  Defaults
+      to infinity.  Use with "builders" to have this slave service multiple
+      builders serially (max-builds: 1).
+    type: int
   buildbot-pkg:
     description: |
       The package name, possibly with versioning information, to be

=== modified file 'examples/lpbuildbot.yaml'
--- examples/lpbuildbot.yaml	2012-05-22 14:47:07 +0000
+++ examples/lpbuildbot.yaml	2012-05-23 01:38:18 +0000
@@ -1,5 +1,6 @@
 buildbot-slave:
-  builders: lucid_lp
+  builders: lucid_lp,lucid_db_lp
+  max-builds: 1
   script-retrieval-method: apt
   script-source: lpsetup
   script-path: "/usr/bin/lp-setup"

=== modified file 'hooks/buildbot-relation-joined'
--- hooks/buildbot-relation-joined	2012-02-29 22:45:07 +0000
+++ hooks/buildbot-relation-joined	2012-05-23 01:38:18 +0000
@@ -16,11 +16,17 @@
     log('Sending builders to the master: {}'.format(builders))
     relation_set(builders=builders)
 
+def send_max_builds(max_builds):
+    if max_builds:
+        log('Sending max-builds to the master: {}'.format(max_builds))
+        relation_set(max_builds=max_builds)
+
 
 def main():
     config = get_config()
     builders = config.get('builders')
     if builders:
+        send_max_builds(config.get('max-builds'))
         # This is the first step of the handshake.
         send_builders(builders)
 


Follow ups