So today, I want to show you how to use Azure Pipeline for Continuous Integration and Continuous Delivery through the Visual Studio 2019. In order to finish this guide you should have
The services can be used for free. Just create an account and you ready to go.
Beginner Guide Scenario
On this guide, I will create a website with ASP.NET MVC template. After that, we will setup the Continuous Delivery and Continuous Integration directly in Visual Studio 2019. Finally, we will check and validate the setup in the Azure Subscription. This guide will be displayed as step by step scenario.
Step by Step Scenario
#1 Build Your Website
We assumed that you already know how to store your codes to the Azure Repos. If you don't know how to upload your codes to the Team Foundation Control or GIT. There will be a guide namely Beginner Guide for Azure Repos. After you connect to the report, you can build your codes and do the first commit. We expect you can do that and already to do that.
#2 Creating Azure Services.
You should have azure services. You can create an Azure Website by following this tutorial https://docs.microsoft.com/en-us/azure/app-service/overview. You can create the Azure Portal, Azure CLI, or through Visual Studio.
#3 Publish your Codes to the Azure Website
After creating an initial website, you can publish the website through the visual studio by right clicking and click publish. In the publishing scheme, you can choose severalways by hosting to the cloud, VM, on-premise, and local folder.
We will choose the Azure Web App and select the existing one. When you click the ok button it will connect your deployment model to the cloud.
#4 Configure the Continuous Delivery
After configuring the cloud, we can configure the continuous delivery as shown below. Please beware that you should have the same App Services with similar App Services.
#5 Configure the Azure Pipelines
The previous step provides a basic way to do CI and CD. The result of the previous step created an azure pipeline configuration for release and for the build. Visual Studio 2017 hosted will compile your codes, build and test when necessary and then pass away the result to the Release (CD). A developer can modify the release script and the developer script in the http://dev.azure.com
Configuring Build Pipeline
In the Azure Pipeline, select the edit menu
You will see the build steps for the project, you can change it when necessary. For example, you want to do additional tasks, you can click the add button to compress, add some file, put some additional SDK, do some unit test, and many more.
Configure Release Pipeline
On this step, you can configure the release activity. Release activity provides some additional action to distribute the solution to the staging or production. On order to do that, you can visit the release menu on the Azure Pipeline features and click edit on the list of release created by visual studio.
That is the basic of the Azure Pipeline with Visual Studio. On the next part, I will create a short video to guide you further on Azure Pipeline.