[Buildbot-devel] Problem using the "env" parameter in source check step

sergio borghese sergio.borghese at gmail.com
Fri Aug 2 15:18:45 UTC 2013


Hi All,

I'm trying to set up a buildslave where I need to set-up some specific
environment variables on the slave to perform the build.

As far as I understand reading the manual, the source checkout clasess
allow to set the environment vars on the slave using the
*env*configuration param.
Specifically I'm trying to modify the slave *PATH*, so I'm setting the env
variable in the SVN step as follow

svn_update_src_macosx = SVN(
                              svnurl           = svn_url,
                              mode            = 'update',
                              haltOnFailure = True,
                              username      = nr.user,
                              password      = nr.pwd,
                              workdir          = nr.uniqlogger_build_root,
                              name            = 'svn update macosx',
                              *env               = {'PATH':
["/opt/subversion/bin", "${PATH}"]} *)

Looking at the log on the master it seems to me the env var is sentto the
slave:

2013-08-02 15:45:23+0200 [-] <Build uniqlogger_macosx_64b>.startBuild
2013-08-02 15:45:23+0200 [-] ShellCommand.startCommand(cmd=<RemoteCommand
'svn' at 48467552>)
2013-08-02 15:45:23+0200 [-]   cmd.args = {'username': 'borghese',
'password': 'XXXXX]', 'workdir': 'build/nr_libs/uniqlogger', *'env':
{'PATH': ['/opt/subversion/bin', '${PATH}']}*, 'always_purge': None,
'patch': None, 'logEnviron': True, 'retry': None, 'timeout': 1200,
'svnurl': 'svn://192.168.23.200/Util/uniqlogger', 'revision': None, 'mode':
'update'}

but on the target slave the env still run with the unmodified PATH:

2013-08-02 15:53:47+0200 [-] RunProcess._startCommand
2013-08-02 15:53:47+0200 [-]  /usr/bin/svn checkout --non-interactive
--no-auth-cache --username borghese --password XXXX --revision HEAD svn://
192.168.23.200/Util/uniqlogger at HEAD build/nr_libs/uniqlogger
2013-08-02 15:53:47+0200 [-]   in dir
/Users/borghese/buildslave/uniqlogger_macosx_64b (timeout 1200 secs)
2013-08-02 15:53:47+0200 [-]   watching logfiles {}
2013-08-02 15:53:47+0200 [-]   argv: ['/usr/bin/svn', 'checkout',
'--non-interactive', '--no-auth-cache', '--username', 'borghese',
'--password', 'XXXX', '--revision', 'HEAD', 'svn://
192.168.23.200/Util/uniqlogger at HEAD', 'build/nr_libs/uniqlogger']
2013-08-02 15:53:47+0200 [-]  environment: {'LANG': 'en_US.UTF-8', 'TERM':
'xterm', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C',
'VERSIONER_PYTHON_VERSION': '2.7', 'SHLVL': '1', 'SSH_TTY': '/dev/ttys004',
'OLDPWD': '/Applications/Utilities', 'VERSIONER_PYTHON_PREFER_32_BIT':
'no', 'SSH_CLIENT': '192.168.23.7 36515 22', '__CF_USER_TEXT_ENCODING':
'0x347D4A6B:0:0', 'KRB5CCNAME': 'API:880626283:5', 'PWD':
'/Users/borghese/buildslave/uniqlogger_macosx_64b', 'LOGNAME': 'borghese',
'USER': 'borghese', 'MAIL': '/var/mail/borghese', *'PATH':
'/usr/bin:/bin:/usr/sbin:/**sbin:/usr/local/bin:/usr/X11/**bin'*,
'SSH_CONNECTION': '192.168.23.7 36515 192.168.23.45 22', 'HOME':
'/Users/borghese', 'TMPDIR':
'/var/folders/pj/ymmtzj1n77qfbw2ymbh3djdht7tklb/T/', '_':
'/usr/local/bin/buildslave'}

hence I get an error from the build step.
Any clue on what I'm doing wrong?

Details of the system:
*build master: gentto runnign buildbot 0.8.7p1
*
*buildslave: macox X 10.7.5 running buildslave 0.8.7p1
*

Many Thanks
Sergio


-- 
preferisco ammazzare il tempo,
preferisco sparare cazzate,
preferisco fare esplodere una moda,
preferisco morire d'amore.
(Caparezza)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130802/83c08fa9/attachment.html>


More information about the devel mailing list