As promised, here are the slides and code samples from my Automated Build, Test & Deploy with TFS, ASP.NET, and SQL Server talk that I did today at VSLive San Francisco 2015.
Here’s the abstract:
Automatically building your ASP.NET code is easy. Create a TFS build and go. But what about the database code? How does that get built? If you’ve got code that that calls the database, how do you test that from an automated build? What about testing those stored procedures and functions? And then there’s the deployment hassles. How do you deploy the ASP.NET application and the database code in an automated fashion from a build. It sure would be nice to just run a build and have everything deployed and configured.
In this session, we’ll start by showing you how to use SQL Server Data Tools Projects (SSDT) to manage your database changes and unit test your database code. Next we’ll put that SQL Server code into TFS version control using Git and TFVC. Then we’ll create a build that will compile and test an ASP.NET application. And finally, we’ll show you how to deploy these changes to either IIS or Windows Azure with a TFS Build using either PowerShell or Team Foundation Server Lab Management.
Here’s a link to the code and automated build samples. Here’s a link to the slides.
If you’re looking for the PowerShell TFS build customization scripts, they’re in the “BuildScripts” folder of the code samples. If you’re looking for the arguments that I put into the build definition in order to call those PowerShell scripts, here’s a screenshot.
Enjoy!
-Ben
Leave a Reply