def remote = [:]
remote.name = "node1"
remote.host = "
192.168.1.211"
....
remote.name30 = "node30"
remote.host = "
192.168.1.230"
remote.allowAnyHosts = true
remote.user = 'sshusername'
remote.password = 'password'
node {
withCredentials([usernamePassword(credentialsId: 'plainssh', passwordVariable: 'password', usernameVariable: 'sshusername')]) {
// some block
stage("SSH Steps Rocks!") {
sshCommand remote: remote, command: 'sudo systemctl stop flask && scp -rp
192.168.1.201:/home/ubuntu/flask-app/templates/index.html /home/ubuntu/flask-app/templates/index.html && sudo systemctl start flask'
}
}
}
вот это говно распараллелить как можно? что б сразу по 5 серверов за раз выполнялось