I have an automated deployment system working using Phing. We are adding a second server and I need to modify the deployment target in order to handle this. My issue is that the paths to deploy to between the two servers are not the same, so I'm not sure how to associate the current deploy server with the path I need to deploy to.
In my main phing.xml
file, I set up properties:
<property name="deploy.servers.production" value="server1.com,server2.com" />
<property name="deploy.path.production" value="/path/on/server1,/path/on/server2" />
During the build, I just have a foreach
element that iterates over the different servers and calls an upload task setting them as a property:
<foreach list="${deploy.servers.production}" param="deploy.server" target="deploy.deliver" />
The problem I have is that I can't find a way to associate the path that I need to deliver to with the server that I'm currently deploying to. What I would like to avoid is having to have separate properties for each server, something like this:
<property name="deploy.servers.production1" value="server1.com" />
<property name="deploy.servers.production2" value="server2.com" />
<property name="deploy.path.production1" value="/path/on/server1" />
<property name="deploy.path.production2" value="/path/on/server2" />
Is there a way to have two separate list properties in phing that correlate with one another?