Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在jenkins作业中将参数传递给远程shell_Jenkins_Jenkins Plugins - Fatal编程技术网

如何在jenkins作业中将参数传递给远程shell

如何在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

我正在尝试使用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 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,解决了这个问题。

不可能解决它!