如何在jenkins作业中将参数传递给远程shell
我正在尝试使用ssh将参数传递给远程计算机。我已经使用ssh插件添加了远程主机如何在jenkins作业中将参数传递给远程shell,jenkins,jenkins-plugins,Jenkins,Jenkins Plugins,我正在尝试使用ssh将参数传递给远程计算机。我已经使用ssh插件添加了远程主机 # works for local shell + echo sdk sdk executing script: BUILD="sdk" # doesn't work for remote shell export BUILD echo "$BUILD" BUILD=sdk: Command not found. export: Command not found. BUILD: Undefined variabl
# works for local shell
+ echo sdk
sdk
executing script:
BUILD="sdk"
# doesn't work for remote shell
export BUILD
echo "$BUILD"
BUILD=sdk: Command not found.
export: Command not found.
BUILD: Undefined variable.
[SSH] exit-status: 1
Build step 'Execute shell script on remote host using ssh' marked build as failure
Finished: FAILURE
我尝试了使用双引号、大括号和export,但没有任何结果,我就能够获得远程shell上的参数值。有人能告诉我jenkins上是否缺少任何配置吗?问题在于远程机器的默认shell。它是tcsh,将默认shell改为bash,解决了这个问题。不可能解决它!