Merge lp:~benji/charms/oneiric/buildbot-master/remove-base64 into lp:~yellow/charms/oneiric/buildbot-master/trunk
- Oneiric (11.10)
- remove-base64
- Merge into trunk
Proposed by
Benji York
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | 26 |
Merged at revision: | 26 |
Proposed branch: | lp:~benji/charms/oneiric/buildbot-master/remove-base64 |
Merge into: | lp:~yellow/charms/oneiric/buildbot-master/trunk |
Diff against target: |
320 lines (+123/-104) 6 files modified
README.txt (+0/-11) config.yaml (+2/-5) examples/pyflakes.yaml (+117/-74) hooks/config-changed (+2/-3) hooks/helpers.py (+1/-9) tests/buildbot-master.test (+1/-2) |
To merge this branch: | bzr merge lp:~benji/charms/oneiric/buildbot-master/remove-base64 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+92582@code.launchpad.net |
Commit message
Description of the change
This branch removes the need to base64 encode the Buildbot config file.
(and it increases the timeout on wait_for_unit so slow unit-creation on EC2 won't bite us so hard)
To post a comment you must log in.
- 26. By Benji York
-
merge from trunk and fix conflict
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README.txt' |
2 | --- README.txt 2012-02-09 14:33:51 +0000 |
3 | +++ README.txt 2012-02-10 21:32:19 +0000 |
4 | @@ -6,16 +6,6 @@ |
5 | repository. |
6 | |
7 | juju bootstrap |
8 | -juju deploy --repository=./charms local:buildbot-master |
9 | -juju deploy --repository=./charms local:buildbot-slave |
10 | -juju set buildbot-master extra-packages=git |
11 | -juju set buildbot-master config-file=`base64 -w0 charms/oneiric/buildbot-master/examples/master.cfg` |
12 | -juju set buildbot-slave builders=runtests |
13 | -juju add-relation buildbot-slave buildbot-master |
14 | - |
15 | -Demo of a full buildbot master directory: |
16 | - |
17 | -juju bootstrap |
18 | juju deploy --config=./charms/oneiric/buildbot-master/examples/lpbuildbot.yaml --repository=./charms local:buildbot-master |
19 | juju deploy --config=./charms/oneiric/buildbot-slave/config.setuplxc.yaml --repository=./charms local:buildbot-slave |
20 | juju add-relation buildbot-slave buildbot-master |
21 | @@ -28,4 +18,3 @@ |
22 | |
23 | juju deploy --repository=./charms local:buildbot-slave |
24 | juju set buildbot-slave builders=lucid_lp,lucid_db_lp |
25 | - |
26 | |
27 | === modified file 'config.yaml' |
28 | --- config.yaml 2012-02-09 18:54:03 +0000 |
29 | +++ config.yaml 2012-02-10 21:32:19 +0000 |
30 | @@ -13,11 +13,8 @@ |
31 | default: /var/lib/buildbot/masters/master |
32 | config-file: |
33 | description: | |
34 | - An encoded master.cfg file. Use of this configuration is |
35 | - mutually exclusive with the use of config-transport and |
36 | - config-url. Use it with the `base64` command like this: |
37 | - juju set buildbot-master \ |
38 | - config-file=`base64 -w0 ./examples/master.cfg` |
39 | + A master.cfg file. Use of this configuration is mutually exclusive |
40 | + with the use of config-transport and config-url. |
41 | type: string |
42 | config-transport: |
43 | description: | |
44 | |
45 | === modified file 'examples/pyflakes.yaml' |
46 | --- examples/pyflakes.yaml 2012-02-09 16:31:10 +0000 |
47 | +++ examples/pyflakes.yaml 2012-02-10 21:32:19 +0000 |
48 | @@ -2,77 +2,120 @@ |
49 | extra-packages: git |
50 | installdir: /tmp/buildbot |
51 | config-file: | |
52 | - IyAtKi0gcHl0aG9uIC0qLQojIGV4OiBzZXQgc3ludGF4PXB5dGhvbjoKCiMgVGhpcyBpcyBhIHNh |
53 | - bXBsZSBidWlsZG1hc3RlciBjb25maWcgZmlsZS4gSXQgbXVzdCBiZSBpbnN0YWxsZWQgYXMKIyAn |
54 | - bWFzdGVyLmNmZycgaW4geW91ciBidWlsZG1hc3RlcidzIGJhc2UgZGlyZWN0b3J5LgoKIyBUaGlz |
55 | - IGlzIHRoZSBkaWN0aW9uYXJ5IHRoYXQgdGhlIGJ1aWxkbWFzdGVyIHBheXMgYXR0ZW50aW9uIHRv |
56 | - LiBXZSBhbHNvIHVzZQojIGEgc2hvcnRlci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GFuZ2VzLmdpdHBvbGxlciBpbXBvcnQgR2l0UG9sbGVyCmNbJ2NoYW5nZV9z |
70 | - b3VyY2UnXSA9IEdpdFBvbGxlcigKICAgICAgICAnZ2l0Oi8vZ2l0aHViLmNvbS9idWlsZGJvdC9w |
71 | - eWZsYWtlcy5naXQnLAogICAgICAgIGJyYW5jaD0nbWFzdGVyJywgcG9sbGludGVydmFsPTEyMDAp |
72 | - CgojIyMjIyMjIFNDSEVEVUxFUlMKCiMgQ29uZmlndXJlIHRoZSBTY2hlZHVsZXJzLCB3aGljaCBk |
73 | - ZWNpZGUgaG93IHRvIHJlYWN0IHRvIGluY29taW5nIGNoYW5nZXMuICBJbiB0aGlzCiMgY2FzZSwg |
74 | - anVzdCBraWNrIG9mZiBhICdydW50ZXN0cycgYnVpbGQKCmZyb20gYnVpbGRib3Quc2NoZWR1bGVy |
75 | - IGltcG9ydCBTY2hlZHVsZXIKY1snc2NoZWR1bGVycyddID0gW10KY1snc2NoZWR1bGVycyddLmFw |
76 | - cGVuZChTY2hlZHVsZXIobmFtZT0iYWxsIiwgYnJhbmNoPU5vbmUsCiAgICAgICAgICAgICAgICAg |
77 | - ICAgICAgICAgICAgICAgIHRyZWVTdGFibGVUaW1lcj1Ob25lLAogICAgICAgICAgICAgICAgICAg |
78 | - ICAgICAgICAgICAgICBidWlsZGVyTmFtZXM9WyJydW50ZXN0cyJdKSkKCiMjIyMjIyMgQlVJTERF |
79 | - UlMKCiMgVGhlICdidWlsZGVycycgbGlzdCBkZWZpbmVzIHRoZSBCdWlsZGVycywgd2hpY2ggdGVs |
80 | - bCBCdWlsZGJvdCBob3cgdG8gcGVyZm9ybSBhIGJ1aWxkOgojIHdoYXQgc3RlcHMsIGFuZCB3aGlj |
81 | - aCBzbGF2ZXMgY2FuIGV4ZWN1dGUgdGhlbS4gIE5vdGUgdGhhdCBhbnkgcGFydGljdWxhciBidWls |
82 | - ZCB3aWxsCiMgb25seSB0YWtlIHBsYWNlIG9uIG9uZSBzb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KRUNUIElERU5USVRZCgojIHRoZSAncHJvamVjdE5hbWUnIHN0cmluZyB3aWxs |
109 | - IGJlIHVzZWQgdG8gZGVzY3JpYmUgdGhlIHByb2plY3QgdGhhdCB0aGlzCiMgYnVpbGRib3QgaXMg |
110 | - d29ya2luZyBvbi4gRm9yIGV4YW1wbGUsIGl0IGlzIHVzZWQgYXMgdGhlIHRpdGxlIG9mIHRoZQoj |
111 | - IHdhdGVyZmFsbCBIVE1MIHBhZ2UuIFRoZSAncHJvamVjdFVSTCcgc3RyaW5nIHdpbGwgYmUgdXNl |
112 | - ZCB0byBwcm92aWRlIGEgbGluawojIGZyb20gYnVpbGRib3QgSFRNTCBwYWdlcyB0byB5b3VyIHBy |
113 | - b2plY3QncyBob21lIHBhZ2UuCgpjWydwcm9qZWN0TmFtZSddID0gIlB5Zmxha2VzIgpjWydwcm9q |
114 | - ZWN0VVJMJ10gPSAiaHR0cDovL2Rpdm1vZC5vcmcvdHJhYy93aWtpL0Rpdm1vZFB5Zmxha2VzIgoK |
115 | - IyB0aGUgJ2J1aWxkYm90VVJMJyBzdHJpbmcgc2hvdWxkIHBvaW50IHRvIHRoZSBsb2NhdGlvbiB3 |
116 | - aGVyZSB0aGUgYnVpbGRib3QncwojIGludGVybmFsIHdlYiBzZXJ2ZXIgKHVzdWFsbHkgdGhlIGh0 |
117 | - bWwuV2ViU3RhdHVzIHBhZ2UpIGlzIHZpc2libGUuIFRoaXMKIyB0eXBpY2FsbHkgdXNlcyB0aGUg |
118 | - cG9ydCBudW1iZXIgc2V0IGluIHRoZSBXYXRlcmZhbGwgJ3N0YXR1cycgZW50cnksIGJ1dAojIHdp |
119 | - dGggYW4gZXh0ZXJuYWxseS12aXNpYmxlIGhvc3QgbmFtZSB3aGljaCB0aGUgYnVpbGRib3QgY2Fu |
120 | - bm90IGZpZ3VyZSBvdXQKIyB3aXRob3V0IHNvbWUgaGVscC4KCmNbJ2J1aWxkYm90VVJMJ10gPSAi |
121 | - aHR0cDovL2xvY2FsaG9zdDo4MDEwLyIKCiMjIyMjIyMgREIgVVJMCgojIFRoaXMgc3BlY2lmaWVz |
122 | - IHdoYXQgZGF0YWJhc2UgYnVpbGRib3QgdXNlcyB0byBzdG9yZSBjaGFuZ2UgYW5kIHNjaGVkdWxl |
123 | - cgojIHN0YXRlLiAgWW91IGNhbiBsZWF2ZSB0aGlzIGF0IGl0cyBkZWZhdWx0IGZvciBhbGwgYnV0 |
124 | - IHRoZSBsYXJnZXN0CiMgaW5zdGFsbGF0aW9ucy4KY1snZGJfdXJsJ10gPSAic3FsaXRlOi8vL3N0 |
125 | - YXRlLnNxbGl0ZSIKCg== |
126 | + # -*- python -*- |
127 | + # ex: set syntax=python: |
128 | + |
129 | + # This is a sample buildmaster config file. It must be installed as |
130 | + # 'master.cfg' in your buildmaster's base directory. |
131 | + |
132 | + # This is the dictionary that the buildmaster pays attention to. We also use |
133 | + # a shorter alias to save typing. |
134 | + c = BuildmasterConfig = {} |
135 | + |
136 | + ####### BUILDSLAVES |
137 | + |
138 | + # The 'slaves' list defines the set of recognized buildslaves. Each element is |
139 | + # a BuildSlave object, specifying a username and password. The same username and |
140 | + # password must be configured on the slave. |
141 | + from buildbot.buildslave import BuildSlave |
142 | + c['slaves'] = [] |
143 | + |
144 | + # 'slavePortnum' defines the TCP port to listen on for connections from slaves. |
145 | + # This must match the value configured into the buildslaves (with their |
146 | + # --master option) |
147 | + c['slavePortnum'] = 9989 |
148 | + |
149 | + ####### CHANGESOURCES |
150 | + |
151 | + # the 'change_source' setting tells the buildmaster how it should find out |
152 | + # about source code changes. Here we point to the buildbot clone of pyflakes. |
153 | + |
154 | + from buildbot.changes.gitpoller import GitPoller |
155 | + c['change_source'] = GitPoller( |
156 | + 'git://github.com/buildbot/pyflakes.git', |
157 | + branch='master', pollinterval=1200) |
158 | + |
159 | + ####### SCHEDULERS |
160 | + |
161 | + # Configure the Schedulers, which decide how to react to incoming changes. In this |
162 | + # case, just kick off a 'runtests' build |
163 | + |
164 | + from buildbot.scheduler import Scheduler |
165 | + c['schedulers'] = [] |
166 | + c['schedulers'].append(Scheduler(name="all", branch=None, |
167 | + treeStableTimer=None, |
168 | + builderNames=["runtests"])) |
169 | + |
170 | + ####### BUILDERS |
171 | + |
172 | + # The 'builders' list defines the Builders, which tell Buildbot how to perform a build: |
173 | + # what steps, and which slaves can execute them. Note that any particular build will |
174 | + # only take place on one slave. |
175 | + |
176 | + from buildbot.process.factory import BuildFactory |
177 | + from buildbot.steps.source import Git |
178 | + from buildbot.steps.shell import ShellCommand |
179 | + |
180 | + factory = BuildFactory() |
181 | + # check out the source |
182 | + factory.addStep(Git(repourl='git://github.com/buildbot/pyflakes.git', mode='copy')) |
183 | + # run the tests (note that this will require that 'trial' is installed) |
184 | + factory.addStep(ShellCommand(command=["trial", "pyflakes"])) |
185 | + |
186 | + from buildbot.config import BuilderConfig |
187 | + |
188 | + c['builders'] = [ |
189 | + BuilderConfig(name="runtests", |
190 | + # Buildbot enforces that the slavenames list must not be empty. Our |
191 | + # wrapper will remove the empty string and replace it with proper values. |
192 | + slavenames=[''], |
193 | + factory=factory), |
194 | + ] |
195 | + |
196 | + ####### STATUS TARGETS |
197 | + |
198 | + # 'status' is a list of Status Targets. The results of each build will be |
199 | + # pushed to these targets. buildbot/status/*.py has a variety to choose from, |
200 | + # including web pages, email senders, and IRC bots. |
201 | + |
202 | + c['status'] = [] |
203 | + |
204 | + from buildbot.status import html |
205 | + from buildbot.status.web import auth, authz |
206 | + authz_cfg=authz.Authz( |
207 | + # change any of these to True to enable; see the manual for more |
208 | + # options |
209 | + gracefulShutdown = False, |
210 | + forceBuild = True, # use this to test your slave once it is set up |
211 | + forceAllBuilds = False, |
212 | + pingBuilder = False, |
213 | + stopBuild = False, |
214 | + stopAllBuilds = False, |
215 | + cancelPendingBuild = False, |
216 | + ) |
217 | + c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) |
218 | + |
219 | + ####### PROJECT IDENTITY |
220 | + |
221 | + # the 'projectName' string will be used to describe the project that this |
222 | + # buildbot is working on. For example, it is used as the title of the |
223 | + # waterfall HTML page. The 'projectURL' string will be used to provide a link |
224 | + # from buildbot HTML pages to your project's home page. |
225 | + |
226 | + c['projectName'] = "Pyflakes" |
227 | + c['projectURL'] = "http://divmod.org/trac/wiki/DivmodPyflakes" |
228 | + |
229 | + # the 'buildbotURL' string should point to the location where the buildbot's |
230 | + # internal web server (usually the html.WebStatus page) is visible. This |
231 | + # typically uses the port number set in the Waterfall 'status' entry, but |
232 | + # with an externally-visible host name which the buildbot cannot figure out |
233 | + # without some help. |
234 | + |
235 | + c['buildbotURL'] = "http://localhost:8010/" |
236 | + |
237 | + ####### DB URL |
238 | + |
239 | + # This specifies what database buildbot uses to store change and scheduler |
240 | + # state. You can leave this at its default for all but the largest |
241 | + # installations. |
242 | + c['db_url'] = "sqlite:///state.sqlite" |
243 | |
244 | === modified file 'hooks/config-changed' |
245 | --- hooks/config-changed 2012-02-10 00:22:21 +0000 |
246 | +++ hooks/config-changed 2012-02-10 21:32:19 +0000 |
247 | @@ -3,7 +3,6 @@ |
248 | # Copyright 2012 Canonical Ltd. This software is licensed under the |
249 | # GNU Affero General Public License version 3 (see the file LICENSE). |
250 | |
251 | -import base64 |
252 | import json |
253 | import os |
254 | import os.path |
255 | @@ -100,8 +99,8 @@ |
256 | # This file will be moved to master.cfg.original in |
257 | # initialize_buildbot(). |
258 | with su('buildbot'), open(master_cfg_path, 'w') as f: |
259 | - base64.decode(StringIO.StringIO(config_file), f) |
260 | - log('config_file decoded and written.') |
261 | + f.write(config_file) |
262 | + log('config_file written.') |
263 | restart_required = True |
264 | elif (config_transport == 'bzr' and config_url and |
265 | 'config-transport' in added_or_changed and |
266 | |
267 | === modified file 'hooks/helpers.py' |
268 | --- hooks/helpers.py 2012-02-10 17:17:47 +0000 |
269 | +++ hooks/helpers.py 2012-02-10 21:32:19 +0000 |
270 | @@ -25,7 +25,6 @@ |
271 | 'unit_info', |
272 | ] |
273 | |
274 | -import base64 |
275 | from collections import namedtuple |
276 | from contextlib import contextmanager |
277 | import json |
278 | @@ -114,13 +113,6 @@ |
279 | return cmd(*args) |
280 | |
281 | |
282 | -def encode_file(filename): |
283 | - """base64 encode the contents of a file and return it.""" |
284 | - with open(filename) as f: |
285 | - contents = f.read() |
286 | - return base64.b64encode(contents) |
287 | - |
288 | - |
289 | def grep(content, filename): |
290 | with open(filename) as f: |
291 | for line in f: |
292 | @@ -237,7 +229,7 @@ |
293 | return item |
294 | |
295 | |
296 | -def wait_for_unit(service_name, timeout=120): |
297 | +def wait_for_unit(service_name, timeout=480): |
298 | start_time = time.time() |
299 | while True: |
300 | state = unit_info(service_name, 'state') |
301 | |
302 | === modified file 'tests/buildbot-master.test' |
303 | --- tests/buildbot-master.test 2012-02-10 17:17:47 +0000 |
304 | +++ tests/buildbot-master.test 2012-02-10 21:32:19 +0000 |
305 | @@ -4,7 +4,6 @@ |
306 | |
307 | from helpers import ( |
308 | command, |
309 | - encode_file, |
310 | make_charm_config_file, |
311 | unit_info, |
312 | wait_for_page_contents, |
313 | @@ -45,7 +44,7 @@ |
314 | 'buildbot-master': { |
315 | 'extra-packages': 'git', |
316 | 'installdir': '/tmp/buildbot', |
317 | - 'config-file': encode_file(bb_config_path), |
318 | + 'config-file': open(bb_config_path).read(), |
319 | }} |
320 | deploy(charm_config) |
321 |
a-ok