[Buildbot-devel] Some good tutorials about running BB on a mac?
Mitch Jones
mitch at niftyneato.com
Fri Jan 14 23:36:11 UTC 2011
On Jan 14, 2011, at 2:34 PM, Fulvio Cervone wrote:
> I've discovered recently BuildBot, and it seems to fit perfectly my needs.
>
> My project is done using mainly Xcode on Mac, and would love to know if there is any tutorial to learn how to install, configure and customize Buildbot on a Mac; the other info available around seems to be very vague and not aimed to something specific (I have Buildbot up and running but now for the customization of the various parts, i have troubles due the fact that i do not know python, and the manual does not have real life examples with code samples).
>
Hi Fulvio,
All of work Mac projects are backed by Buildbot and I've done some of what you're asking. My buildbot tracks several subversion repositories and projects.
> I admit that is not the easiest thing to use, but it is powerful and it really helps me to keep track of my projects; so I hope that any of you knows where should I look to get some tutorials that could teach me how to customize BB.
>
> In particular this is what i am trying to get:
>
> -configure a project with multiple slaves
>
This is pretty straight-forward.
For each slave, put something like the following in your master.cfg
BuildSlave('Your slave name', 'your_slave_password', max_builds=1, notify_on_missing="you at some.mail.com")
Of course, you'll want to change the name and password to whatever is appropriate for you.
When you create the builder, you'll give it the slave name that should handle it.
> -make a nicer waterfall page and replace the standard one.
I'd like this too, but I've never defined what it is I actually want to be better. The jinja template work that recent went in should help with this I believe but someone else will need to chime in to describe how to change this.
> -understand how to modify the emails (i would like to have a custom email when a build fail, so all the other teammates are aware of it, and in particular the person that broke the build)
I've got code that does this that is basically verbatim from the buildbot docs. Rather than duplicate that here, contact me off list if you can't find it.
> -my projects has dependencies (i have a custom framework that we write almost every day, and it is used to build or app), so I would like to know how to manage these dependencies, so if my custom framework fails I do not get failures in my build project (if is even possible)
One way to handle this would be through trigger build steps, where the a successful build in a parent would trigger the child dependency. In my case, I chose to incorporate my dependent libraries into one step since by themselves the components I'm building aren't interesting. When one fails during a build, the next step doesn't occur.
For my purposes, I threw together a simple XCode class that handles the xcodebuild build command, and here it is:
from buildbot.steps.shell import Compile
class Xcode(Compile):
def __init__(self,
target,
configuration = "Release",
projectFile = None,
**kwargs):
self.target = target
self.configuration = configuration
self.projectFile = projectFile
# always upcall !
Compile.__init__(self, **kwargs)
self.addFactoryArguments(
target = target,
configuration = configuration,
projectFile = projectFile
)
def start(self):
command = ["xcodebuild"]
if self.projectFile != None:
command.append("-project")
command.append(self.projectFile)
command.append("-target")
command.append(self.target)
command.append("-configuration")
command.append(self.configuration)
self.setCommand(command)
return Compile.start(self)
Adding it to a builder is simply:
f = factory.BuildFactory()
f.addStep(xcode.Xcode(name="My App", workdir=projectDir("/relative/path/to/app"), target="My Target"))
> I know that there is a lot here; but I am kinda lost, so after trying to read the documentation I've decided to ask to a wider audience :)
Hope some of this helps.
--
Mitch Jones
mitch at niftyneato.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4388 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20110114/676855f6/attachment.bin>
More information about the devel
mailing list