I have an ASP.NET MVC 3 Website in C# with
- ASP.NET MVC 3 Internet Project
- Domain Project (Class Library)
- Unit Testing Project
- SQL Server 2008 R2 Database
- Source Control on Mercurial
What is the easiest way to do a 12:00AM automated nightly build and deployment of the site so that everyday I could go to dev.mycompany.com and would see a live updated version of my Dev version?
I was thinking of using Jenkins to do all of the building.
I help maintain a system much like this — in Jenkins. Obviously the details will vary based on your project structure, but here’s roughly what our Jenkins job does:
We have a separate job that runs our NUnit tests, but you could just as easily incorporate your tests into your main job. One of the reasons we build the whole .sln instead of the web .csproj is so we can run our unit tests from the same built code.
If you haven’t already, you will need to install ASP.NET MVC3, .NET 4, and msdeploy on the build server, and I believe you’ll need most of the same files on your web servers as well.
For scheduling, you can choose “build periodically” or “poll SCM” as your build trigger, and then use cron-like syntax (0 0 * * *) to run daily at midnight.