Visual Studio Team Services (VSTS) – formerly known as Visual Studio Online – is a SaaS offering of Visual Studio on Microsoft’s Azure platform. At its heart, the service is the cloud implementation of Team Foundation Services. Two of the service’s features, Continuous Integration and Release Management, were leveraged by AIS for a large federal client as part of a broader push for more streamlined DevOps practices.

Continuous Integration (CI) is a development practice where developers can integrate their changes into a shared code repository, which in turn triggers an automated build. This allows the development team to be quickly notified of any problems or errors caused by the checked-in change. VSTS’s Release Management Service allows developers to automate their deployment pipelines across any environment and platform – more than just .NET applications. For our federal client, the goal was to automate the entire continuous integration and release process for an ASP.NET Web API hosted in an Azure Web App. Since the client already had a subscription to VSTS, it was very straightforward for us to implement the entire solution within that one service.

To set up CI within VSTS, the first step is to create a build definition. This is just a template that contains the location of the code within source control, and several build steps. In our case, we just used out-of-the-box processes to restore NuGet packages for the solution, build the projects in the solution, and then publish the build artifacts to a drop folder within VSTS.

After the files are published to the drop folder, they are ready to be picked up by the release management process. The same principle applies to release management – a definition is needed. Here we were able to specify the various environments the application will be deployed to and run any tasks on the files before deploying to the environment’s Azure App Service.

Setting up this service takes almost no time at all, but can offer great benefits to the client – especially considering (in our case) they were already subscribed to the service. The developers working on the client’s API can now have their changes to the application automatically built and deployed to a test environment within minutes. This is the first step of many to get the client up to speed with modern DevOps practices.

This diagram shows the basic Continuous Integration and Release flow, from the developers to the production environment.

Source