Build and deploy to an Azure Web App using VSTS (Quick Starts)

Build and deploy to an Azure Web App using VSTS (Quick Starts)



In this Azure Quick Start Damian Brady will show you how to build a CI/CD Pipeline to deploy an ASP.NET Web App to Azure using Visual Studio Team Services (VSTS)

For the full documentation see:

hi everyone welcome to another Asha quick start today we're going to be building an entire CI CD pipeline using visual studio team services to deploy an asp net web app to Azure my name is Damien Brady and I'm a cloud developer advocate at Microsoft so the quick start I'm following here is the build and deploy to an agile web app one on Docs Microsoft comm so I'm just running through this QuickStart and you can do the same I have created a new instance of visual studio team services so if I go to code the first thing we're going to do is grab that sample code so we can import from an existing git repository so we've got this github example here so let's import that repository into V STS so we can use the code more locally codes been imported now um the next thing we want to do is create a web app in Asia for us to deploy to so if we go to the azure portal the first thing we want to do is create a resource and we're going to create a web app so let's click on that we're going to give it a unique name so let's call this let's call this as a quick start taken dotnet there we go I'm going to use my visual studio enterprise subscription create a new resource group and I'm going to use Windows rather than Linux and I'm going to use my free service plan that I've got here as well so let's click create and that'll go away and create our resource in Azure okay so that's completed now let's go to that resource and I'm going to scroll down to this tab right down the bottom called continuous delivery preview so that's where we can set up our CI CD pipeline to deploy to this agile app service so let's click configure and I need to give it a bit of information here first I need to tell it where my code lives now my code is in visual studio team services I'm using my demo MS demos account and the azure QuickStart project and repository and that branch now I'm using V STS but if you wanted to you can get your code from github or an external git or a local one as well those are all options available to you so the next thing we need to do is tell it what we're building and I'm building an asp.net core application but you can see there's options for node PHP Python static web apps as well we're using ASP net core so let's do that if I wanted to at this point I could also set up some load testing to test my service before actually deploying it to production and I can also deploy to a different staging slot if I had staging slots enabled I'm gonna leave those for the moment and we're just going to let that go ahead and configure their continuous delivery for us in vs TS okay so that's been set up now and you can see that it's created a build definition a release definition and even triggered a build if we click on build definition that'll take us right into visual studio team services to show us that there is a build running and the same would happen with the link for release as well so let's have a look at this build process running and just highlight a couple of things that are happening here first we see all of the logs that are happening as this application builds we can follow along with the build itself to make sure that everything's going okay we can see our progress on the left as well as all the logs on the right so let's just wait for that to finish so while that's building let's just go and have a look at that release and once again this link directly to the release definition takes us right there so we don't have any releases running at the moment but you can see the pipeline that's been set up if you edit that release definition we're taking the drop from our build and going straight into production so once this is complete once the CI build and the continuous deployment has finished we can come back to Asha and if we refresh the logs we can see that the activity logs actually show that we have this version of our source deployed using this build and this release so if we jump up to our overview we can click on the URL and see that websites been up as well and so there's our starting application now if we jump back to V STS and want to actually make a change to our code we can do that directly here as well so if we go to code and then files we can have a look at our net course sample go to views and let's have a look at our home index we can edit this directly in the browser as well but normally when you're editing your code you're probably doing it in Visual Studio or vs code or something like that let's just do this C ICD demo make a commit updated index.html that's fine and then that commit has been pushed to V STS and if we go back to our build and release we should be able to see that there is another build in progress that will also deploy and push that out to our azure app service as well so there you go that is the way to get started with CIC d deploying an asp.net web application all the way through to Azure with a correct pipeline

Leave a Reply