jenkins osx节点错误的环境变量

时间:2017-04-19 10:08:39

标签: windows bash macos shell jenkins

我在Windows 7机器上设置我的jenkins,运行xcode构建,我向它添加一个Mac从属节点,但是,该节点继承了Windows环境变量并且找不到任何mac命令(即使是最简单的{ {1}}或sh

我在节点配置中设置PATH,以及EnvInject

git

这会导致所有这些wierd命令找不到错误: [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content PATH=/usr/bin:/usr/local/bin [EnvInject] - Variables injected successfully. [project] $ /bin/bash /var/folders/r8/29j5d4f15csc0x727z1y6zr8000086/T/hudson5065016463950292533.sh path = C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;...all_windows_path_here

1 个答案:

答案 0 :(得分:0)

通常,除非用于启动从属代理的方法明确地执行此操作,否则从属服务器不应从主服务器继承环境。

看起来你的奴隶代理没有正确启动;您可以查看从Windows启动unix like agent(osx)的说明:https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Differentwaysofstartingslaveagents