首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在jenkins作业中向远程shell传递参数

如何在jenkins作业中向远程shell传递参数
EN

Stack Overflow用户
提问于 2017-06-07 02:36:38
回答 0查看 1.4K关注 0票数 1

我正在尝试使用ssh向远程机器传递一个参数。我已经使用ssh插件添加了远程主机。

代码语言:javascript
复制
# 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

我尝试了双引号,大括号,导出,但是我什么都没有得到远程shell上的参数值。如果我在jenkins上遗漏了任何配置,有人能告诉我吗?

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44397466

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档