[Buildbot-devel] setting environment variables in build steps

Axel Hecht l10n.moz at googlemail.com
Fri Nov 23 10:23:39 UTC 2007


2007/11/23, Stefan Seefeld <seefeld at sympatico.ca>:
> Axel Hecht wrote:
>
> > I guess you had to unbitrot the patch in ticket 52 to get it working.
> > Or subclass, with an unbitrotted version. If you do, attach a new
> > patch? ;-)
>
> OK, I think I have patched the 0.7.6 code enough to make it work.
> (I'll send out an updated patch to #52 once I'm happy with it.)
> Almost: I now get a Keyerror, as 'workdir' isn't known to whereever
> WithProperties tries to look it up.
>
> (I'm trying " env={'MY_PATH':WithProperties('%(workdir)/lib')}")
>
> So here is this part of the question again: What variables are actually
> exposed through the WithProperties facility ? 'workdir' doesn't appear
> to be part of that set.

It'll be just another dozen mails 'til I really get it, I promise.

So, by default, buildername, buildnumber, branch, revision,  and
slavename are set properties, see
http://buildbot.net/trac/browser/buildbot/process/base.py#L258.

The only way to set more properties is to actually write custom
buildsteps that do it,
http://buildbot.net/repos/release/docs/buildbot.html#Build-Properties.

Now, for workdir in particular, that would be a property on the
buildstep, not the build. It sounds more logical to me to have an
initial buildstep that would set, say, ALF_LIBRARY_BASE, and use that
property to set the workdir for the step that actually creates alf,
and then use the same base variable to set your ALF_LIBRARY_PATH for
make check.

As the current workdir for a step could be anything on the run, I'd
rather not set that as a build property.

Axel




More information about the devel mailing list