【发布时间】:2019-01-12 23:40:17
【问题描述】:
我在 Jenkins 中将 bash 脚本作为作业运行时遇到问题(执行 shell 步骤)。基本上,我现在将脚本缩小为一行,以测试 Jenkins 无法运行它的原因。这里是:
waxsim
所以它只有一行。当没有参数运行时,这应该给我这个输出:
No app-path was specified!
usage: waxsim [options] app-path
example: waxsim -s 2.2 /path/to/app.app
Available options are:
-s sdk Version number of sdk to use (-s 3.1)
-f family Device to use (-f ipad)
-e VAR=value Environment variable to set (-e CFFIXED_HOME=/tmp/iphonehome)
-a Available SDKs
-v path Output video recording at path
-h Prints out this wonderful documentation!
Jenkins 以 jenkins 用户身份运行。作业运行时失败:
+ waxsim
/var/folders/gx/t63prwt53w7gr2jjt9k66q9800009c/T/hudson4478539334800834890.sh:
line 3: waxsim: No such file or directory
Build step 'Execute shell' marked build as failure
当我手动执行waxsim,以詹金斯用户身份登录时,一切正常。它适用于机器上的每个用户。它仅在 Jenkins 作业中执行时才起作用。有谁知道可能是什么问题?
我尝试指定waxsim 的完整路径,即:/usr/bin/waxsim,但没有区别。
谢谢!
【问题讨论】: