In this article, I will be sharing the good practices in working with YAML-based pipelines using an example of the Blazor app and publishing it Azure App Service.

If you have already started using Azure Devops, you surely would have come across Pipelines service in it. Azure Pipelines will enable you to orchestrate CI/CD in a more defined and standardized manner. Azure Pipelines supports two types

1. Classic Pipelines

2. YAML Pipelines

Let us explore the YAML ones. Basically, you can write the entire CI/CD in one single YAML pipeline which is convenient for apps with not much third-party tools integration. Another good way is to split the entire pipeline into small YAML files or templates for items such as Variables, Build and Deploy stages. By doing this the actual pipeline will be quite neat and readable.

Below is the structure of the YAML Pipelines

We will inspect each YAML file in detail

1. Standard-CI-CD-Pipeline.yaml –This is the main yaml file. We will refer to other templates from here.

The list items in the trigger section enable the triggering criteria — Master/Release branch changes.

Variables are read from templates which is another yaml file in the same directory. The same goes for build and deployment templates. Please note that we are also passing variables read from the variables template to the build and deployment template using the value of the parameter.

#azure-devops #automation #blazor #cloud

Azure DevOps — Multi-stage YAML based CI/CD pipelines for Blazor App
1.30 GEEK