[Buildbot-devel] Big fat buildbot example

Dan Kegel dank at kegel.com
Mon Nov 12 04:15:57 UTC 2012


On Mon, Nov 5, 2012 at 6:31 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
> On Mon, Nov 5, 2012 at 5:49 AM, Pierre Tardy <tardyp at gmail.com> wrote:
>> One of the key problem is the slave managment system. I think you may
>> improve SimpleConfig to have a generic slave capability system,where each
>> slave would have a capability dictionary can be a string or a list e.g:
>> OS = "windows"
>> supported_test = [ "lint", "selexium"]
>
> This is a great idea.  We do something similar with the metabuildbot:
>   https://github.com/buildbot/metabbotcfg/blob/master/slaves.py#L191

OK, I've done the tiniest possible subset of this, where the
only property of a slave at the moment is the platform.
Example: a buildmaster with two projects and three platforms:

import SimpleConfig
BuildmasterConfig = SimpleConfig.SimpleConfig(
    name="big.master",
    )

BuildmasterConfig.addSimpleProject(
    name="hello",
    repourl='git://git.savannah.gnu.org/hello.git',
    )

BuildmasterConfig.addSimpleProject(
    name="zlib",
    repourl='git://github.com/madler/zlib.git',
    )

This implicitly loads slaves.json from next to master.cfg:
{
    "slaves" : [
        { "name":"big.master-e8400",    "os":"win7"    },
        { "name":"big.master-i7",       "os":"ubu1204" },
        { "name":"big.master-dans-mac", "os":"osx107"  }
    ]
}

and builders.json from each project's directory, e.g.

{
    "builders" : [
        { "os":"win7",    "branch":"master" },
        { "os":"ubu1204", "branch":"master" },
        { "os":"osx107",  "branch":"master" }
    ]
}

That lets you add branches without caring about what the
slaves are named exactly, and add slaves without getting
into each project's pants.

(Code's at https://github.com/dankegel/ciwrap as usual.
At the moment I still make master.cfg specify the path
to builder.json, but will probably make that implicit.)

It's coming along.
- Dan




More information about the devel mailing list