[Buildbot-devel] Serial numbering of builds

John Pye john.pye at student.unsw.edu.au
Thu May 18 08:10:28 UTC 2006

A.T.Hofkamp wrote:
> John Pye wrote:
>> I would like to get some kind of build numbering based on the revision
>> number in the repository. Can Buildbot tell me what is the current
>> revision number from SVN (step.SVN), so that I can pass it into my build
>> script (step.Compile)? How would I do that?
> Currently, no afaik.
> In a next version there will be script variables to pass such
> information as argument to the steps.
> If you run your build in a working copy, you could ask svn for the
> repo number and use that (quite trivial using pysvn). Otherwise, add
> an extra step that finds the repo number and writes the information in
> a file to be used later.
> At the moment I do the latter.
> It works quite nicely. The biggest disadvantage is the enormous amount
> of build versions that you get, so almost immediately one needs an
> automagic policy to delete non-interesting build results.
> Maybe this is an area that buildbot should cover in the future?
Strikes me as a waste of effort. After all, Buildbot clearly does know
the revision number: it shows it in its log pages. So it should be
possible to incorporate it into the build somehow, right, without
messing around with temporary files etc?

> A few weeks back I found that using repo numbers only for builds only
> works when all builds are done at the same place in the repo (ie the
> trunk).
> When having two different versions of the same software at the same
> time (one at a branch and one at trunk), the repo number is not enough
> to differentiate between the two.
> I am still puzzling how to deal with this problem.
I am sure that you could use subversion 'properties' to access the name
of the current branch...? Then, only make a build if you're in a
particular branch, perhaps.
> Obviously I need some additional version information but I'd like to
> have a scheme that can handle any order of releasing and branching (in
> the ideal case even nested branching).
> I would expect that somebody at this planet has already found a nice
> way of dealing with this problem, but I haven't found it yet.
Don't be too sure ;-)


John Pye
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney  NSW 2052  Australia
t +61 2 9385 5127
f +61 2 9663 1222

More information about the devel mailing list