Sunday, May 15, 2022

Drawing Workflow Charts in Azure DevOps Wikis

Azure DevOps wikis supports Mermaid syntax  that can be used to draw diagrams such as flow charts, UML diagrams, pie charts, Gantt charts and many more. 

This blog explains mermaid syntax sample in Azure DevOps 

  • Script starts with :::mermaid and ends with :::
  • Diagram type can be defined as graph, pie and more
  • Shape style can be selected as,

        () - rounded rectangle

        {} - diamond

        [] - rectangle

Friday, January 21, 2022

Enabling Sequential Deployments with Exclusive Environment Locks

When using an Azure DevOps deployment pipelines with exclusive lock for a stage and triggering a deployment pipeline parallelly, only the latest deployment runs and all previous deployments that triggered automatically get cancelled. This would be fine with cumulative deployments, however, if you have a different content in each deployment run, canceling the one deployment affect the system badly due to missing updates to the system. 

Following image shows, pipeline automatically cancelled the previous run and runs only the latest deployment.

Saturday, January 8, 2022

Azure DevOps YAML Pipeline Path Filters with Wildcards

When working with YAML pipelines, we can define pipeline trigger options such as branch triggers and path filters. However, there was a limitation to set path filters before. The path filters cannot have wild cards. However, now Azure DevOps supports wild cards in path filters in YAML pipelines as explain in this blog.

Pre-requisite: Repo with a code solution

Following is the project structure we are going to use for the path filter.  Once add a change to one of the cshtml files, sample YAML pipeline use in this blog should be triggered automatically.

Friday, December 10, 2021

Task Retries in Azure DevOps Pipelines

Automated processes failing from the intermittent issues (due to connectivity failures etc.) is one of the main challenges you might face while automating build and releases using CI/CD tools. Azure DevOps has introduced new task retry feature as a solution to intermittent failures. You can retry only the failed task multiple times without requeue entire pipeline. This blog is explaining how to use retry in Azure DevOps pipelines.

Following is a PowerShell task in a pipeline which is generating random number and mark task as success if the random number is even, otherwise failing the task with an exception. we have to setup number of retried to enable the feature of retrying on a task failure.

Tuesday, November 30, 2021

Prevent Employees from using Company Email to Create Azure DevOps Organizations

Individuals who have company email which is added to an organization's Azure Active Directory can create their own personal Azure DevOps organizations using the company email. But, Azure DevOps has a feature to restrict creating Azure DevOps organizations using organization's email. As explained in the previous blog (Making Personal Access Token More Secure in Azure DevOps), Add "Azure DevOps administrator" user role to the Azure DevOps admin user to enable the feature. 

Go to Azure Active Directory Section of Organizations settings page of  Azure DevOps to enable the feature.

Thursday, November 18, 2021

Making Personal Access Token More Secure in Azure DevOps

Personal Access Token (PAT) is used to authenticate Azure DevOps. But, once a new PAT created, it can be shared across multiple organization. It might not be the ideal solution when considering the security aspect. So, Azure DevOps has a new feature to restrict the PAT shared across multiple Azure DevOps organizations.

Pre requisites: Azure DevOps organization which connected to Azure AD

Go to Azure DevOps organization settings and select Azure Active Directory under general section. In there, you would be able to connect to Azure Active Directory. 

Wednesday, November 3, 2021

GitHub Action Pipeline with Terraform State File in Azure Blob

In previous blog, we discussed how to do infrastructure automation while maintaining the Terraform state file in Terraform cloud. But, teams can maintain terraform state file in Azure portal along with  other resources. You can learn how to maintain terraform state file in azure blob in this blog.

You can create a resource group, storage account and container in azure to keep the terraform state file. Then add storage container details to Terraform script as follows.

Note the backend section of the below which specifies the Azure blob storage and container to maintain the Terraform state. It is required to create the blob storage container manually before trying out the pipeline.

Tuesday, October 26, 2021

GitHub Action Pipelines - Deploying Terraform

Terraform is an infrastructure automation tool which enable reliable and repeatable resource deployment in cloud environments. GitHub actions becoming a popular choice of CI/CD for most of the source code repos used in GitHub.

Let's look at how to setup a GitHub action pipeline to deploy Azure resource using Terraform script.


  • Terraform workspace
  • Terraform API Token
  • GitHub account
  • Azure subscription

Let's add secret values which we going to use in action pipeline.