Merge lp:~gary/charms/oneiric/buildbot-slave/extra-packages into lp:~yellow/charms/oneiric/buildbot-slave/trunk

Proposed by Gary Poster
Status: Merged
Merged at revision: 23
Proposed branch: lp:~gary/charms/oneiric/buildbot-slave/extra-packages
Merge into: lp:~yellow/charms/oneiric/buildbot-slave/trunk
Diff against target: 50 lines (+14/-0)
3 files modified
config.yaml (+8/-0)
examples/lpbuildbot.yaml (+1/-0)
hooks/config-changed (+5/-0)
To merge this branch: bzr merge lp:~gary/charms/oneiric/buildbot-slave/extra-packages
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+93515@code.launchpad.net

Description of the change

This branch moves over the extra-packages feature from the buildbot-master. LP needs it for parallel testing, as shown by the included config change.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

This looks good.

A small redundancy: there's no need for the .strip() because the split
will remove any leading, trailing, or duplicate whitespace around the
package names.

review: Approve (code)
15. By Gary Poster

[r=bac] move HACKING to README per review

16. By Francesco Banconi

[r=gmb] Added revision file. Removed juju_wrapper.

17. By Brad Crittenden

[r=frankban] Install python-shell-toolbox in the install hook. Temporarily add copies of helpers.py and local.py until a proper sharing solution is implemented. These files are to be edited in the buildbot-master and kept in sync.

18. By Benji York

correct the buildbot home dir

19. By Benji York

[r=gary] add a work-around to a bug in LXC

20. By Francesco Banconi

[r=gmb] upgrade-charm hook.

21. By Benji York

- tweak the lpbuildbot example config to specify alternate key names
- make the buildbot group creation unconditional
- add a --yes when adding a repository

22. By Benji York

merge from trunk

23. By Gary Poster

add extra-packages functionality, as with buildbot-master. We need it to include testrepository.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2012-02-09 14:02:35 +0000
3+++ config.yaml 2012-03-10 14:01:17 +0000
4@@ -36,6 +36,14 @@
5 ones added previously will not be removed. An example would be:
6 deb http://us.archive.ubuntu.com/ubuntu/ lucid main universe
7 type: string
8+ extra-packages:
9+ description: |
10+ A space-separated list of packages to be installed. The
11+ repositories to use in getting these packages should have been
12+ set prior to setting this value. Calling multiple times will
13+ install the newly specified packages while leaving the previous
14+ ones installed.
15+ type: string
16 installdir:
17 description: |
18 The directory where the Buildbot slave will be installed.
19
20=== modified file 'examples/lpbuildbot.yaml'
21--- examples/lpbuildbot.yaml 2012-03-06 18:23:20 +0000
22+++ examples/lpbuildbot.yaml 2012-03-10 14:01:17 +0000
23@@ -8,3 +8,4 @@
24 script-args: "-u buildbot -e launchpad-pqm@canonical.com -f 'Launchpad PQM' -s launchpad_lxc_id_rsa {installdir}"
25 extra-repository: deb http://us.archive.ubuntu.com/ubuntu/ lucid main universe
26 buildbot-pkg: buildbot/lucid
27+ extra-packages: testrepository
28
29=== modified file 'hooks/config-changed'
30--- hooks/config-changed 2012-02-29 22:45:07 +0000
31+++ hooks/config-changed 2012-03-10 14:01:17 +0000
32@@ -33,6 +33,7 @@
33
34 buildbot_pkg = config.get('buildbot-pkg')
35 extra_repo = config.get('extra-repository')
36+ extra_pkgs = config.get('extra-packages')
37 buildbot_dir = config.get('installdir')
38
39 if extra_repo and 'extra-repository' in diff.added_or_changed:
40@@ -43,6 +44,10 @@
41 log(e)
42 raise
43
44+ if extra_pkgs and 'extra-packages' in diff.added_or_changed:
45+ apt_get_install(
46+ *(pkg.strip() for pkg in extra_pkgs.split()))
47+
48 if buildbot_pkg and 'buildbot-pkg' in diff.added_or_changed:
49 log('Installing ' + buildbot_pkg)
50 apt_get_install(buildbot_pkg)

Subscribers

People subscribed via source and target branches

to all changes: