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

Dustin J. Mitchell dustin at v.igoro.us
Sun Aug 11 03:46:01 UTC 2013


On Fri, Aug 2, 2013 at 11:18 AM, sergio borghese
<sergio.borghese at gmail.com> wrote:
> 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'}

You're using the old slave-side source steps.  Those are deprecated
and, apparently, do not handle environment variables well.  I'd
recommend switching to the master-side SVN step.

Dustin




More information about the devel mailing list