I have code in a repository. Now I want to create a job which will build code from the repository and deploy it on two servers.
Right now I create two jobs with exactly
I solved similar problem with ant tasks - getting server urls as input parameter from build.properties file. In my case there were several environments to support with same script, 1-2 servers on each.
if (properties['app.server'] && properties["app.server"] != "") {
ant.project.executeTarget('deploy.server1')
}
if (properties['app.server2'] && properties["app.server2"] != "") {
ant.project.executeTarget('deploy.server2')
}