直接上源码:
node {
stage('Parallel Stage') {
parallel 'ok' : {
def remote = [:]
remote.name = "test01"
remote.host = "192.168.xx.xxx"
remote.allowAnyHosts = true
remote.user = 'xxx'
remote.password = 'xxxxxx'
stage("test01-build") {
sshCommand remote: remote, command: "C:/jenkins/ppp.bat"
}
},'okk' : {
def remote = [:]
remote.name = "test02"
remote.host = "192.168.xx.xxx"
remote.allowAnyHosts = true
remote.user = 'xxx'
remote.password = 'xxxxxx'
stage("test02-build") {
sshCommand remote: remote, command: "C:/jenkins/qqq.bat"
}
}
}
}
更多主机的话,继续如上添加
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧
当前标题:pipeline实现多windows主机并发构建-创新互联
分享URL:http://tyjierui.cn/article/ediie.html