【发布时间】:2017-07-26 14:31:03
【问题描述】:
在“Manage Jenkins” -> “Configure System” -> “全局属性”中,我添加了:
Name: git
Value: /path/to/my/git
和:
Name: PATH+git
Value: /path/to/my/git
但是,如果我从 Jenkins 管道尝试 sh("git status"),我会得到:
git: command not found
如果我尝试使用完整路径 sh("/path/to/my/git status"),则会看到 git。
知道为什么git 在被声明为环境变量后在 Jenkins 流水线脚本中没有出现吗?
【问题讨论】:
标签: git jenkins jenkins-pipeline