Call Us:

Automated Build using TFS build definations

Customer Background

One of worldwide humanitarian organization having same issues discussed above. They have their development teams (in-house and service provider) distributed geographically. They have environments like Staging, UAT and Production. So any new development task or bug will always first deployed to Staging for QA. After quality check it push to UAT where actual business users will do the sign off and later it will be moved to final production environment.


So, if something they want to make live, their current deployment process was taking almost whole day including publishing code, making build package, uploading it to FTP, login to remote server, taking backup of existing site and database, update configuration as per live environment, restarting web server, testing and verifying deployed code and so on… So they can just do deployment only once in day.

Also, take a case that if they have found some critical issue on production site, and they want to fix it earliest possible. But team from different location is working on different module and code is checked in to source control but not yet tested and approved by QA. So, it was risky and even not possible to push new critical fix on production along with that untested piece of code. We helped them by implementing Branching and Merging mechanism in TFS. So, in above scenario that can easily fix and deploy critical bug on production branch codebase and push it to live. Later that code will be merged to Staging and Development branch to incorporate in later release.


As as solution of this, we have implemented automated build using Customized Build Definition. So, any developer from remote location from their local development machine can raise build request and it will do whole release automatically within maximum two minutes as below:

  • It will request to TFS Agent to raise build. It will do automatic compilation and follow automated tests.
  • On successfully compilation and test pass, it will prepare build package on predefined drop location and create zip files. It will also translate configuration file based on the target environment like stating or production and put whole bundle on FTP server automatically.
  • While, on production server, one job is running every one minute and downloading latest package from FTP server. Later, first take backup of existing website files, stop web server, extract latest package on website location, restart web server and finally sent mail automatically to all configurable stakeholders that new release done with list of issues deployed and name of person who has initiated build

Above, process was fully automated and done on just one mouse click and you can monitor the progress of running build status. After this implementation, organization was able to do any number of release to any environment in day.

We have also integrated custom timesheet application in TFS server for them, so project stakeholders can log their time spent of on particular work item or issue. Here interesting thing was, their business users using sharepoint issue tracking list which was outside from TFS. So, new issues raised by them was not appearing in TFS work items list. So, we have created bridge for sharepoint and TFS which was pulling all the issues from sharepoint and TFS work items and vice versa.