Search code examples
asp.netasp.net-mvcdeploymentautomated-deploy

ASP.NET Automated deployment to remote ftp server


Does anyone know any good solutions for automated deployment to a remote server using SFTP? I am specifically trying to deploy an asp.net mvc website to mosso. I can do it manually every time using an SFTP client, but would much rather have an automated (and consistent) way to do this.


Solution

  • I have written a pretty detailed blog post using TeamCity, and Web Deployment projects to automate build and deployment as a starter 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

    A basic process flow is pretty simple:

    • 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.

    Some great free tools to get going are: