[Buildbot-devel] FileUpload and wildcard support?

Dossy Shiobara dossy at panoptic.com
Tue Apr 1 16:31:01 UTC 2008


Hi,

For the Gnash project, I've set up a Buildbot for the project:

    http://gnashdev.org/buildbot/

There's a bunch of different builders, each representing a different
architecture/OS that corresponds to a BuildSlave.

I've added a Nightly scheduler to kick off daily builds at 03:00 for
a few builders.

As part of the build output, I generate a .tar.gz or .zip of the
resulting binaries.  The archives are generated with a build step like
this:

    tar = s(ShellCommand, name="tar", command=["sh", "-c", WithProperties("(cd dist && tar cvf - .) | gzip -c > ../%(buildername)s-build-%(buildnumber)s.tar.gz")], description=["archiving"], descriptionDone=["archive"])

I don't want the archive uploaded after _every_ build, only the one
Nightly build.  Also, since the archive name changes each build (since
it includes the build number in the filename), I can't hardcode the
filename in the slavesrc= or masterdest= parts of the FileUpload step.

I've created a scheduler that's dependent on the Nightly scheduler,
which I'm hoping can perform the "daily build upload":

    sched_upload = Dependent(name="upload", upstream=sched_nightly, builderNames=["upload-tgz", "upload-zip"])

However, I'm stumped as to how to create the BuildFactory steps for
FileUpload for "upload-tgz" and "upload-zip" so that it can pick up the
correct build filename off the slaves for each builder.

Any advice?  I could duplicate all my builders and name the new
instances "%(buildername)s-nightly" and duplicate the BuildFactory with
an extra FileUpload step at the end, but that would seriously clutter up
the Waterfall and the duplication would be a master.cfg maintenance
headache.

Conditional build-step execution would be really cool.  Maybe I can hack
together a buildbot.steps.conditional.If that could take an expression
and a buildbot.process.buildstep.BuildStep and invokes it if the
expression evaluates to true?  Then, if I could write an expression that
says "scheduler == nightly" ...

Save me from myself!  Show me the obvious right way to do this.  :-)

-- Dossy

-- 
Dossy Shiobara              | dossy at panoptic.com | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)




More information about the devel mailing list