所以我的version.txt
源代码管理中有一个文件。我在 master 和 build 上检查它,并通过一个文件设置环境变量,文件路径为
$WORKSPACE/Version.txt
在 master 上,它正确地找到了 Version.txt 并设置了MAJOR=x
等等。
当我在从节点上进行相同的构建时,使用相同的配置,我总是得到一个
[envfile] Reading environment variables from file.
[envfile] Path to file: /var/hudson/workspace/DEV_BUILD/Version.txt
[envfile] Can not find environment file. Path to file=[/var/hudson/workspace/DEV_BUILD/Version.txt]
但我之前看到:
Building remotely on cent5.5_64
Cleaning the workspace because project is configured to clean the workspace before each build.
server: 192.168.1.207
[UGCS_DEV_BUILD] $ sscm get / -wreplace -d/var/hudson/workspace/DEV_BUILD -r
从 main/DEV 获取:
/var/hudson/workspace/DEV_BUILD/Version.txt
我猜$WORKSPACE
是指高手?任何人有任何想法如何让它在奴隶上工作?