[Buildbot-devel] ForceScheduler with codebases
Leif Walsh
leif.walsh at gmail.com
Tue Jul 16 01:20:41 UTC 2013
SingleBranchScheduler works like that, I'm almost certain.
I haven't really found any good examples. My best resources have been the API docs online and, frankly, the source code. There's a blog post out there that acknowledges this (I think it's called something like "getting started with buildbot in 5 minutes" but I'm composing this on the subway) and is also a pretty good initial resource that explains the concepts. When I get around to posting mine I'll try to remember to let you know (but I can't guarantee it'll actually be a *good* example ;-).
Overall the API is pretty good. (Nearly) everything works well with properties, and whenever there are gaps in functionality you can usually get around them with 5 minutes of hacking and a ShellCommand or two. The hardest things for me have been modeling my Builders, dealing with a lack of reentrancy in my builds (that wasn't a problem until buildbot made concurrent builds possible), and discovering buildbot's features, none of which, sadly, do I have very good advice for.
--
Cheers,
Leif
On Mon, Jul 15, 2013 at 7:16 AM, null <andrew.inglis at optusnet.com.au>
wrote:
> Hi Leif,
> Thanks for your help with this. I managed to get the force scheduler
> going using your suggestion and a few other minor changes.
> If I use the all_codebases definition as the codebase parameter in a
> singlebranch scheduler, will it respond to changes on different
> branches across the codebases (i.e. repo1, branch 1 & repo2 branch 2)?
> Finally, I'm having some trouble with the configuration file syntax in
> general. Would you know of any good sources of example configuration
> files I can use as a guide?
> Thanks again for all your help.
> Andrew
> ----- Original Message -----
> From: "Leif Walsh"
> To:
> Cc:
> Sent:Fri, 12 Jul 2013 04:23:34 -0700 (PDT)
> Subject:Re: [Buildbot-devel] ForceScheduler with codebases
> You need one more piece, it's a little confusing but this should do
> it:
> In addition to everything you have now, add this:
> all_codebases = {"repo1codebase", {"repository":
> "git at github.com:myproject/repo1.git"}, "repo2codebase",
> {"repository": "git at github.com:myproject/repo2.git"}}
> And then in your scheduler, use this as the codebases arg, rather than
> what you have now. --
> Cheers,
> Leif
> On Fri, Jul 12, 2013 at 6:19 AM, andrew.inglis at optusnet.com.au
> wrote:
> Hi,
> I am currently having some problems getting a buildbot environment up
> and running. I'm fairly new to buildbot so I suspect I have
> misunderstood the documentation, and/or have some configuration
> errors. Any help you can give me would be appreciated.
> I am building a project from components in separate git repositories,
> and I would like to be able to manually trigger a build, specifying
> the branch or revision for each repository. The documentation and
> posts I've read suggest I should be able to do this with a
> ForceScheduler and codebase definitions for each repository.
> However when I force a build via the waterfall web-page the build
> fails in the first build step with:
> No sourcestamp found in build for codebase ''
> The important configuration details from master.cfg:
> From an earlier post I read on this list I defined a
> codebaseGenerator:
> all_repositories = {
> r'git at github.com/MyProject/MyRepo1.git': 'Repo1Codebase',
> r'git at github.com/MyProject/MyRepo2.git': 'Repo2Codebase',
> }
> def codebaseGenerator(chdict):
> return all_repositories[chdict['repository']]
> c['codebaseGenerator'] = codebaseGenerator
> From the same post the ForceScheduler was defined as:
> forceScheduler = ForceScheduler(
> name='MyForceScheduler',
> builderNames=['MyBuilder'],
> codebases=all_repositories)
> The build factory and associated steps:
> buildFactory = BuildFactory()
> buildFactory.addStep(Git(repourl='git at github.com:MyProject/MyRepo1git',
> mode='incremental', workdir="Repo1Dir"))
> .... other steps to build ....
> buildFactory.addStep(Git(repourl='git at githubcom:MyProject/MyRepo2.git',
> mode='incremental', workdir="Repo2Dir"))
> ... other steps to build etc......
> builderConfig = BuilderConfig(
> name='MyBuilder',
> slavenames=['buildslave1'],
> factory=buildFactory)
> Configurations & versions:
> Buildmaster & buildslave (virtual machines): Ubuntu 12.04 LTS,
> Buildbot: 0.8.7, Twistd:12.2.0
> Should this approach work? What am I doing wrong?
> Thanks and best regards,
> Andrew
> -------------------------
> Email sent using Optus Webmail
> -------------------------
> Email sent using Optus Webmail
> Links:
> ------
> [1] mailto:andrew.inglis at optusnet.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130715/dbd70226/attachment.html>
More information about the devel
mailing list