Configure Continuous Delivery(CD) to Azure right from the Visual Studio

Configure Continuous Delivery(CD) to Azure right from the Visual Studio

Over the last few posts, we have discussed several ways of setting up Continuous Integration(CI) and Continuous Delivery (CD) pipeline for build and release lifecycle. We have seen how we can leverage Azure DevOps Project to set up everything we need for develop, deploy and monitor a solution. We have also explored, how to configure the Continuous Delivery(CD) from the Azure Portal for App Services. In this post, we will learn another easiest way to set up the Continuous Delivery(CD) pipeline directly from the Visual Studio.

Continuous Delivery to Azure right from the Visual Studio

Once your Visual Studio solution is ready and source code is configured in Code repository, you can start the setup process for Continuous Delivery (CD). From the Solution Explorer, right click on the Solution and select Configure Continuous Delivery to Azure.

 

Continuous Delivery to Azure from Visual Studio
Continuous Delivery to Azure from Visual Studio

 

After that, it will bring the configuration dialog window. Most of the information will be pre-populated, but you are free to change them such your subscription, App service name and its plan. Also, we have set the code branch as master from where we are going to perform all the final deployment.

Configure Continuous Delivery to Azure from Visual Studio
Configure Continuous Delivery to Azure from Visual Studio

That’s it. Click on Ok.

From this point, Visual Studio will take care of the rest. It will first create all necessary Azure Resources, App Service Plan, App Services in your Azure Subscription. Then, it will set up the Build and Release definition within the Visual Studio Team Services. However, you can monitor the steps and progress of the setup from the Output Window by selecting “Show output from Continuous Delivery Tools

 

Continuous Delivery setup Progress from Visual Studio
Continuous Delivery setup Progress from Visual Studio

 

Related Tip: Get the most out of Output Window in Visual Studio

You will get a notification post the process completion.

 

Continuous Delivery setup Progress from Visual Studio Completed
Continuous Delivery setup Progress from Visual Studio Completed

Finally, review the messages in output window post setup is done.

The continuous build delivery setup for Team Project corewepappproject completed successfully. Builds are now automatically generated and deployed to App Service MyCoreWebApp-dev-as upon code updates.
Details:
 Azure App Service: MyCoreWebApp-dev-as
 VSTS Team Project: CoreWepAppProject (https://<yourvstsaccount>.visualstudio.com/CoreWepAppProject)
 VSTS build definition: https://<yourvstsaccount>.visualstudio.com/_permalink/_build/index?collectionId=d53af129-a57c-ff-ac7c-aazzbb&projectId=123444-3d04-4905-902c-2323232&definitionId=14
 VSTS release definition: https://<yourvstsaccount>.visualstudio.com/232323-3d04-4905-902c-2323/_release?definitionId=1

Continuous Delivery to Azure right from the Visual Studio: Validate Build and Release Environment

Click on the Build and Release definition link for the details of the Build and Release setup as well as to explore the detailed task created for the deployment.

 

Release Pipeline Visual Studio CD
Release Pipeline Visual Studio CD

Refer to the following post for more details on the Build and Release pipeline and their tasks.

Hope this helps.

DON'T MISS OUT!
Subscribe To Newsletter For your Daily Development Tips and Tricks  

 Best Tips & Tricks on Microsoft Technology Platform 

Invalid email address
We promise not to spam you. You can unsubscribe at any time.
Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.