def urls = ["ip1","ip2"]
userid = "user"
password = "password"
sfile = "c:/a.txt"
ant = new AntBuilder()
urls.each { url ->
ant.scp(file: "${sfile}",
todir: "${userid}@${url}:/appbak/",
password: "${password}",
trust:"true")
}
def urls = ["ip1","ip2"]
userid = "user"
password = "password"
sfile = "c:/a.txt"
ant = new AntBuilder()
urls.each { url ->
ant.scp(file: "${sfile}",
todir: "${userid}@${url}:/appbak/",
password: "${password}",
trust:"true")
}