Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#/.NET - Continuous Integration and FTP Deployment

Note: I'm a newb to Continuous Integration

What is the "best" approach to get these functions:

  1. Build (assemblies and web app)
  2. Testing (MbUnit or NUnit)
  3. and if it passes tests deploy via FTP to the main server (internet).

And what I mean by "best" is cheapest option, and easy to learn (low headache).

like image 298
BuddyJoe Avatar asked May 03 '09 21:05

BuddyJoe


1 Answers

I have written a pretty detailed blog post using TeamCity, and Web Deployment projects to automate build and deployment (local) here:

http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn

I have then added to this to show FTP addition

http://www.diaryofaninja.com/blog/2010/09/21/continuous-integration-tip-1-ndash-ftp-deployment

Basically the process is like this:

  • Using a teamcity build server i download from my SVN repo
  • I build and deploy the site to a local folder on the build server
  • I fire a command line FTP client that supports scripting called WinSCP using the MSBUILD Task EXEC (http://winscp.net/)
  • Upload all my sites content
  • Have insert beverage of choice

I then make sure that i only deploy the Trunk of my SVN repo, and develop and test everything in an branch before merging - this way only tested stuff gets deployed. Add Automated testing to your build cycle and you've got a match made in heaven.

like image 189
Doug Avatar answered Sep 22 '22 12:09

Doug