Wednesday, December 7, 2011

My Instant Continuous Integration environment for development


A simplest dev environment for continuous integration for a dev team [considering a php project with mysql db] :
1. Install Visual SVN server - its for windows and easy to install and manage SVN server.
2. Create a post commit hook for the repo; to do that - In the VisualSVN Server GUI Tool:
-Select your repository
-Right click Properties Select the Hooks tab
-Select the Post-commit hook
-Click the Edit button.
-Enter a line like this into the textbox:
c:\program files\visualsvn server\bin\svn.exe" export https://svn.yourserver.com:4433/svn/YourRepository/Websites/YourWebsite/ C:\inetpub\wwwroot\YourWebsite --quiet --non-interactive --force --username youruser --password yourpassword
-Click Ok.
3. Now for the DB Sync follow the steps in the following article : [However, you might need some modification to meet your need]
http://www.decodephp.com/2008/09/29/svn-and-mysql-schema-synchronization/

Surely, You can add more flavor to this environment, like you can add a script to run each day so that it grabs all the commit logs and emails to the test team and/or stack holders or may to the entire team - so that everybody remains better informed.

Hope this will help us a to remain synced in an Agile team.
Those who is not aware of the term Continuous Integration, you can check this wikipedia link