首页 文章

詹金斯奴隶路径不工作

提问于
浏览
0

看到这个:How to set the PATH environment variable in Jenkins configuration on Windows?

我在我的windows slave上设置了这样的路径:
enter image description here

然后尝试在管道中运行它:

sh script: "echo sdfsdfsdf"

我得到错误:

java.io.IOException: CreateProcess error=2, The system cannot find the file specified

编辑:确实发生了一些奇怪的事情,我不明白这种行为 . 我直接将“C:\ Program Files \ Git \ usr \ bin \”添加到从站的系统路径并重新启动代理,然后开始工作:

sh script: "echo sdfsdfsdf"

但这没有找到“cmd.exe”:

bat script: "echo sdfsdfsdf"

然后我从奴隶中删除了路径env,现在又完成了工作 .

那么奴隶的设置是做什么的,什么?我不知道 . 真的很喜欢只使用那个设置而不是像这样的外部从属配置 .

1 回答

  • 0

    设置完路径后,您是否重新连接了座席?这是必需的 .

    此外:不确定Jenkins是否理解Windows环境变量表示法 . 使用 ${Path};C:\Program Files\Git\bin

相关问题