如何在Unix TeamCity构建代理上设置环境变量PATH和LD_LIBRARY_PATH? [英] How can I set environment variables PATH and LD_LIBRARY_PATH on Unix TeamCity build agent?
问题描述
我使用TeamCity在Unix(Solaris)上构建c ++。 TeamCity调用make,在我的makefile中,我需要调用 svn
。为此,我需要修改 PATH
和 LD_LIBRARY_PATH
。
I use TeamCity to build c++ on Unix (Solaris). TeamCity invokes make, and within my makefile I need to call svn
. For this I need to modify PATH
and LD_LIBRARY_PATH
.
我可以在makefile中设置这些,但是位置因服务器而异。有没有人知道一个方法来设置这些为每个TeamCity构建代理,例如。通过编辑 conf / buildAgent.properties
?
I could set these within the makefile but the locations vary from server to server. does anyone know a way to set these for each TeamCity build agent, e.g. by editing conf/buildAgent.properties
?
我可以在〜/
I could set them in ~/.login
etc for the TeamCity build account, but I would prefer not to as it is a shared account.
-thanks,Barney
-thanks, Barney
推荐答案
您可以创建一个包装器脚本,在执行TeamCity命令之前导出这些变量。
You could create a wrapper script that exports these variables before executing the TeamCity command.
这篇关于如何在Unix TeamCity构建代理上设置环境变量PATH和LD_LIBRARY_PATH?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!