wiki:FAQ

Version 9 (modified by dustin, 9 years ago) (diff)

--

Can I use a single buildmaster for multiple projects?

This is, by far, the most frequently-asked question.

The short answer is, no. Run a different buildmaster for each project. It's straightforward, but does require a lot of CPU and RAM.

The longer answer is, maybe. It depends on how your packages are arranged in your version control repository, and whether they are interdependent. Users have co-opted the 'category' field that can be attached to a Change object, and filtered on by schedulers. Others simply treat projects as "branches" of a single repository. Complications often arise having to do with ordering of revision numbers, particularly for projects in different repositories.

We are working on a fix for this in 0.8.0.

Consult the mailing list archives for discussion of various implementations of multi-project buildmasters.

Why don't wildcards work in my ShellCommand?

Probably because your build slave is running a Unix variant and you wrote your command as a list (the recommended way):

factory.addStep(ShellCommand(
    command=["rm", "*.old"],
    ...))

The advantage of writing your command as a list is that it is executed directly by BuildBot, without a shell getting in the way. That means you won't have problems with quoting or whitespace in filenames. But since there is no shell involved, it also means that wildcards will not be expanded: BuildBot simply passes the string *.old to rm, which complains because there is no such file.

The solution is to specify your command as a string, so it will be run by /bin/sh:

factory.addStep(ShellCommand(
    command="rm *.old",
    ...))

However, this can introduce all the classic shell quoting nightmares.

Alternately, you can get BuildBot to explicitly run the command with /bin/sh:

factory.addStep(ShellCommand(
    command=["/bin/sh", "-c", "rm *.old"],
    ...))

Why don't redirects/pipes/etc work in my ShellCommand?

For the exact same reason that wildcards don't work. See the previous question.

Can I build a project that is composed of code from multiple repositories?

A common example: a project that packages several independently-developed utilities into a single binary for users to download.

This is also very difficult to do. The problem is figuring out when to trigger a new build, and which revision to use in each repository.

We are working on a fix for this, too.

Why isn't buildbot designed for my build process, since it's a very common process?

Most people feel that their build proces is "normal", "obvious", or "common". It's not. No two buildbot users have the same build process, nor do they organize their code in the same way. You can believe this now, or watch the mailing list and IRC channel for a week or so and believe it later.

My Mac Buildslave can't resolve domain names

Macs use "security contexts", so if you start a buildslave via an SSH connection, then once that connection disappears, the context does, too. See UsingLaunchd or UsingStartupItemContext for workarounds.

I'm getting errors about overly-long filenames

This is surprisingly common, especially on Windows and, to a lesser extent, Mac buildslaves, when you have tests that create lots of nested directories. There's not a lot that Buildbot can do, but here are some ideas:

  • set up your buildslave root directories in a short top-level directory, e.g.,
    buildslave create-slave /B master:9989 botname botpass
    
  • use abbreviated builddirs in your builder configurations:
    c['builders'] = [ 
           BuilderConfig(
               name="my really long builder name",
               builddir="mrlbn",
               ...
           ) ]
    

With both of these in place, Buildbot will only contribute /B/mrlbn to the pathnames - the other 247 characters will be up to the developers to remove.

I'm seeing "LogFileScanner? has no attribute _remainingData"

This is an incompatibility in versions Buildbot-0.8.2 and earlier when running against Twisted 10.2.0 - see #1697. A few solutions are available:

  • downgrade Twisted (e.g., pip install Twisted==10.1.0)
  • upgrade Buildbot to 0.8.3 or later
  • apply the fix