[SalesForce] Customizing Package.xml for updating Sandboxes with Continuous Integration

I am setting up a continuous integration for a team development process using GitHub and Ant (and eventually Jenkins) and have a problem with deploying to dev sandboxes to keep them in sync with Production:

How do you programmatically customize the Package.xml and the src/ folders to only include the metadata files that have changed in Production?

Our Production environment has over 5000 files so if I retrieve the entire metadata set from Production to the master branch, rebase the dev sandbox branch and attempt to deploy that to its dev sandbox, I hit the API limit for deploying metadata via the API. The metadata in Production changes both from packages deployed from sandboxes as well as from changes made directly in Production by Admins, so I cannot rely on combining all pushed metadata files and package.xml files.

Best Answer

try this, only generate package.xml for the files in the commit:

http://kevinbromer.com/2013/03/dynamically-building-package-xml

Related Topic