Thoughts on Buildbot and on JSON APIs

Amar Takhar verm at darkbeer.org
Tue Dec 1 02:55:23 UTC 2015


On 2015-12-01 02:48 +0000, Mark Atwood wrote:
<snip>
> I see that Amar is going to write a short tool to display test run pass info
> from our buildbot array.  Thank you Amar.  Let us all know when it's working,
> and make it as brutally simple as possible.

I just played around not like it was hard:

-----
#!/usr/bin/env python

import httplib
import json

conn = httplib.HTTPSConnection("buildbot.ntpsec.org")
conn.request("GET", "/api/v2/builders")
r1 = conn.getresponse()
data1 = r1.read()

j = json.loads(data1)

for e in j["builders"]:
    print "%-41s %s" % (e["name"], "https://buildbot.ntpsec.org/#/builders/%s" % 
e["builderid"])
----

I asked one of the other developers if we've abstracted the API somewhat if we 
have I'll write a simple shim to go from CLI -> BB API.


Amar.


More information about the devel mailing list