I\'m trying to use Phing to automate :
What you say makes sense : it's pretty close to what I often use (sometimes with ant, sometimes with phing, and sometimes with some shell-scripts).
In the build
directory, I would have something like this :
build/
testing/
development/
staging/
production/
common/
With one build.xml
file in each sub-directory -- all including another build.xml
file, located in the common
directory, the idea being to put as much "common" code as possible in the "common" build.xml
file, and to have per-environment specific files, that contain as few xml code as possible.
This can be done with the import task that exists in the last version of phing (not sure it's in the stable version -- I'm using an SVN checkout of phing, to have this one, for the project I'm currently working on).
One thing, though : you say you want to deploy to production from the production server ; I would rather, instead :
The idea being to :
Oh, and, as a sidenote : you have to write some kind of documentation of "how to deploy to production", step by step !
This will be really useful the day you are in holiday and someone else has to deploy to production because of an urgent bug-fix ;-)