Ticket #142 (closed defect: duplicate)
Environment variables not set when using new addStep() syntax
| Reported by: | mloskot | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | undecided |
| Version: | 0.7.6 | Keywords: | environment variables env |
| Cc: |
Description
Yesterday, I migrated my Buildbot instances from 0.7.4 to 0.7.6 and I noticed that when using new syntax of BuildFactory?'s addStep() does not preserve my environment variables:
- old version
factoryFull.addStep(step.ShellCommand,
name = 'cmake',
description = ['configuring'],
descriptionDone = ['cmake'],
command = ['cmake', '.'],
env = { 'FWTOOLS_HOME' : __dirFWTools }
)
- new version
factoryFull.addStep(
shell.ShellCommand(
name = 'cmake',
description = ['configuring'],
descriptionDone = ['cmake'],
command = ['cmake', '.'],
env = { 'FWTOOLS_HOME' : __dirFWTools }
))
When I use the new version, a function-like call of ShellCommand?, the FWTOOLS_HOME is not set and not reported in BuildStep? output on WebStatus?:
- environment configured when using old syntax
environment: FWTOOLS_HOME=/osgeo/buildbot/qgis/usr/FWTools-2.0.0 G_BROKEN_FILENAMES=1 HISTSIZE=1000 HOME=/home/buildbot HOSTNAME=xblade14-2 INPUTRC=/etc/inputrc KDEDIR=/usr LANG=en_US LESSOPEN=|/usr/bin/lesspipe.sh %s LOGNAME=buildbot LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35: MAIL=/var/spool/mail/buildbot OSGEOBUILDHOME=/osgeo/buildbot PATH=/usr/local/Trolltech/Qt-4.3.2/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin PWD=/osgeo/buildbot PYTHONPATH=/osgeo/buildbot/usr/lib/python2.4/site-packages QTDIR=/usr/lib/qt-3.3 QTINC=/usr/lib/qt-3.3/include QTLIB=/usr/lib/qt-3.3/lib SHELL=/bin/sh SHLVL=3 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass SSH_CLIENT=84.10.81.30 49215 22 SSH_CONNECTION=84.10.81.30 49215 198.202.74.219 22 SSH_TTY=/dev/pts/3 TERM=xterm-color USER=buildbot _=/usr/bin/buildbot
- environment variables configured when using new syntax
environment: G_BROKEN_FILENAMES=1 HISTSIZE=1000 HOME=/home/buildbot HOSTNAME=xblade14-2 INPUTRC=/etc/inputrc KDEDIR=/usr LANG=en_US LESSOPEN=|/usr/bin/lesspipe.sh %s LOGNAME=buildbot LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35: MAIL=/var/spool/mail/buildbot OSGEOBUILDHOME=/osgeo/buildbot PATH=/usr/local/Trolltech/Qt-4.3.2/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin PWD=/osgeo/buildbot PYTHONPATH=/osgeo/buildbot/usr/lib/python2.4/site-packages QTDIR=/usr/lib/qt-3.3 QTINC=/usr/lib/qt-3.3/include QTLIB=/usr/lib/qt-3.3/lib SHELL=/bin/sh SHLVL=3 SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass SSH_CLIENT=84.10.81.30 54965 22 SSH_CONNECTION=84.10.81.30 54965 198.202.74.219 22 SSH_TTY=/dev/pts/3 TERM=xterm-color USER=buildbot
As you see, if I use new syntax the extra environment variable (FWTOOLS_HOME) I set while adding new step is not available. Am I doing anything wrong?
Change History
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
This is a dupe of #126, from what I see. We're actively using the patch that's in there, works for us.