通过 jenkins 管道安装 Tomcat 和 JDK



我有一些想法,通过jenkins管道脚本安装Tomcat和JDK。使用 SSH 代理,我可以连接我的主机。登录后,我必须安装雄猫,然后安装JDK。

node {
def remote = [:]
remote.name = 'my-machine'
remote.host = 'my-machine-poc.com'
remote.user = '*****
remote.password = '******'
remote.allowAnyHosts = true
stage('Remote SSH') {
sshCommand remote: remote, command: "ls -lrt"
sshCommand remote: remote, command: "for i in {1..5}; do echo -n "Loop $i "; date ; sleep 1; done"
}
}

如果可能的话,你能请有人帮我吗?

如果你正在使用 debian 也许: sudo apt get-install tomcat

最新更新