Build Azure Pipeline to your DotVVM application
Tags: devops, azure, dotvvm, dotnet
Published: 2020-05-25 15:20:48

#### What is CI/CD? 

> Continuous integration (CI) and continuous delivery (CD) embody a culture, set of operating principles, and collection of practices that enable application development teams to deliver code changes more frequently and reliably. The implementation is also known as the _CI/CD_ pipeline.
> src : [https://www.infoworld.com/article/3271126/what-is-cicd-continuous-integration-and-continuous-delivery-explained.html](https://www.infoworld.com/article/3271126/what-is-cicd-continuous-integration-and-continuous-delivery-explained.html)

#### Azure Pipeline for DevOps
> Azure Pipelines is a continuous delivery tool, designed to build code in popular languages, test them, and then deliver them to your choice of endpoint. Like other CI/CD systems, it’s also extensible, with a library of tasks and extensions to add support for test tool and for integration with your devops tool chain.
> src : [https://www.infoworld.com/article/3305845/how-to-work-with-azure-pipelines-for-devops.html](https://www.infoworld.com/article/3305845/how-to-work-with-azure-pipelines-for-devops.html).

#### DotVVM CI/CD Pipeline
In this article we will go through steps required to enable CI/CD to your DotVVM web application.

*To keep it short and focus on CI/CD pipeline we will not show steps required to create DevOps project on Azure DevOps. If you want to know more you can try [this Lab](https://www.azuredevopslabs.com/labs/vstsextend/azuredevopsprojectdotnet/).* 

 1. Go to [devops.azure.com](devops.azure.com) and login.

 2. Open your devops project and go to Pipelines then click on ***Create Pipeline***


 3. Select where to connect to get your code. Here I host my DotVVM application on Azrue Repos Git.
![enter image description here](https://cdn-images-1.medium.com/max/2000/1*oZnSrM3Drc1fjgZyi5LXAw.png)

 4. Azure displays all available repositories in selected host. Select your DotVVM repository.

 5. once you select your target repository, Azure pipeline will go to configure your pipeline step where you select your application type. If the target application type is not listed click in **_show more_** button. 
    For your DotVVM application you can select **ASP.NET Core (.Net Framework)**    
   ![enter image description here](https://cdn-images-1.medium.com/max/1800/1*KbjEPI85LpqOGmDjJnN7kQ.png)

 6. In review step, Azure displays your pipeline in YAML format. You can edit if you want manually or click on show assistant in upper right corner to select the tasks you want to to add to your pipeline.
    ![enter image description here](https://cdn-images-1.medium.com/max/1800/1*j9XlTjknawneCzqJn99r7A.png)

 7. From task list, select .Net Core task to publish your DotVVM web application.
          - Command : publish
          - Publish web project : checked
          - Zip published projects : checked
          - Add project's folder name to publish path : checked
     ![enter image description here](https://cdn-images-1.medium.com/max/1800/1*fl-lGM45iVgAL3KneiyBvg.png)

 8. From Task list select Azure App Service Deploy task to deploy your DotVVM to azure app service with the following configuration
       - Connection Type : Azure Resource Manager
       - Azure subscription : select one from your available subscriptions
       - App Service type : Web App on Windows
       - App Service name : select your target App service from App services available in selected subscription. If the list is empty you have to create App service first before creating your pipeline.
![enter image description here](https://cdn-images-1.medium.com/max/1800/1*_hGN2hrmQApJIytMpc3XoA.png)
 Then click Add button to add this task to your pipeline.
 
 9. Click Save and run to save your pipeline for future updates and run it immediately. If you don't want to run it, just click on down arrow and click save.
![enter image description here](https://cdn-images-1.medium.com/max/1800/1*ZR9qTG3P3I_fDeq6nJAxtQ.png)

 10. Azure will commit this pipeline to your master branch or you can create a separate branch for this commit. 
     ![enter image description here](https://cdn-images-1.medium.com/max/1800/1*o5Ti6GPp10DrgW-qduSY1A.png)

Now your pipeline is configured and ready to run and deploy your DotVVM application to target Azure App service. After each push you do to master branch of your repository your azure pipeline will be triggered and deploy a new version of your DotVVM application .

####Summary

In this article we showed a simple way to configure an Azure Pipeline to enable CI/CD for your DotVVM application to be deployed to a specified Azure App Service.