0

I am in the process of writing a declarative jenkinsfile to build a pipeline project. Some of the steps within a few of the stages will require some remote commands to be run. The remote ssh sites have been configured in the main jenkins configuration.

How can I declare these steps within my jenkinsfile? I know I can run shell commands locally using sh but it's the remote servers that i need to know about?

4

1 回答 1

0

您需要安装ssh-agent插件,然后才能使用 ssh 执行远程命令。检查此示例

于 2018-03-28T16:18:26.113 回答