Posts

Showing posts with the label Release Management

Create a draft release and start it using the TFS REST API

The code below uses the preview API to retrieve a release definition, create a new draft release from the latest build, update some variables, then activate the release and start the deployment on a specific environment. It serves as a reference regarding how to use the RM API. I used the following nuget packages: <packages>   <package id="Microsoft.AspNet.WebApi.Client" targetframework="net452" version="5.2.3"/>   <package id="Microsoft.AspNet.WebApi.Core" targetframework="net452" version="5.2.3"/>   <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" targetframework="net452" version="3.14.1"/>   <package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" targetframework="net452" version="15.118.0-preview"/>   <package id="Microsoft.TeamFoundationServer.Client" targetframework="net452...

Deploy an ASP.NET MVC Web Application to Azure Website using Release Management for TFS

Image
There are a lot of articles about the integration of an Azure VM into Release Management for TFS. What if you simply want to deploy an ASP.NET MVC application without the need to provision a dedicated machine. It turns out to be quite simple. One of the most efficient way to do it is to create the initial deployment from Visual Studio and then pick up the piece to build a RM template. My Web Application is quite simple: a database, a Entity Framework Code First model all sitting inside the ASP.NET MVC application. Like all deployments, the main process is: - generate the Web Deploy Package with placeholders for configuration (connection string, parameters, etc.) using TFS Build (or whatever build system you have). - Deploy to the staging machine (using a agent-based or agent-less machine) - Run the MS Deploy CMD file with the appropriate parameters to trigger the deployment on Azure. The reason I use a staging machine as the basis for the CMD is that it allows me to restrict th...