Friday, December 20, 2024

Working with Unskippable Stages in Azure DevOps

Azure DevOps pipelines have several stages, and we can use these stages to fulfill various specific automation requirements. However, there can be stages that should not be skipped during the deployment process for any reason. For example, some organizations may have a policy that it is mandatory to run automated tests before deployment, or it is mandatory to run a security scan stage. By default, Azure DevOps allows its users to skip stages when initiating a new pipeline run. Now, Azure DevOps has introduced a new property that can be used with YAML pipelines to disable the option to skip stages during the pipeline creation.

Pre-requisites:

Azure DevOps YAML pipeline with multiple stages

Tuesday, November 26, 2024

Simplifying Docker Authentication in Azure DevOps with Azure Workload Identity

Credential based authentication methods have several disadvantages such as security risks and secret management overhead. As a solution Azure Managed Identity and Azure Workload Identity can be used as modern and secure, non-credential-based authentication method for workloads running outside or inside Azure.

Workload Identity Federation can now be used with Azure DevOps Docker service connection targeting Azure Container Registry. This blog will explain how to use workload Identity with Azure DevOps Docker service connection.

Wednesday, November 20, 2024

Using Azure DevOps UI to Enable Detailed Pipeline Logs

In Azure DevOps YAML pipelines, detailed logs can be enabled by setting the system.debug value to true. This enables verbose logging, providing additional details in the logs, such as task inputs/outputs, agent setup details, and more descriptive error messages.

Further, Azure DevOps provides a UI feature to enable detailed logs before running a pipeline. To enable detailed logging, follow these steps.

Wednesday, October 9, 2024

Optimizing CI/CD Pipelines by Looping Jobs with Dependencies in YAML

This blog explains how to create multiple jobs using an array and define a final job that depends on the previous loop jobs.

The following is the first YAML template file ( deploystage.yaml) with stages. Under the jobs section, it includes two templates. The first template is called within a loop, creating multiple jobs. 

Wednesday, September 11, 2024

Enabling Manual Triggers for Azure DevOps Pipeline Stages

Azure DevOps pipeline stages now support manual triggers, allowing for more flexibility. There are situations where some stages of a pipeline should run automatically, while others may require manual intervention. This blog explains how to configure a manual trigger for Azure DevOps pipeline stages.

Pre-requisites: Azure DevOps YAML Pipeline

To enable a manual trigger for a specific stage, include the trigger: manual option in the pipeline's YAML definition. Below is an example pipeline demonstrating how to configure a manual trigger for a stage.

Sunday, September 8, 2024

Advanced Input Variable Validation with Terraform

Terraform provides a variable validation feature that allows defining conditions to validate variable inputs. Previously, variable validation only allowed validating the input of the variable itself. However, starting with Terraform 1.9, this feature has been enhanced to allow the addition of validation conditions that reference other input variables and objects. This blog presents a simple example that explains how to add a condition to one variable that references another variable.

Pre-requites: Terraform 1.9 or greater

The following sample script is used to create two Azure resource groups. One in the West Europe region and the other in the East US region. The two resource groups should not be created in the same region.

Tuesday, August 6, 2024

Ensuring Outbound Rules of Azure App Service

In situations where Azure App Service is configured with network protection, it is crucial to know which systems and applications have access to the App Service, and which applications and systems can be accessed from the App Service (outbound). This blog explains a simple but useful trick that can be used to check the outbound rules of the App Service.

Prerequisites: Azure App Service with restricted internet access

Saturday, July 27, 2024

How to Reset Azure VM Password for Domain Controller

This blog explains how to reset the Azure domain controller VM's password when the local administrator password expires.

Pre-requites: Azure VM as a domain controller and expired local administrator password

Resetting the Azure VM password using the "Reset password" option under the Help in the Service menu will give the following error. "VMAccess Extension does not support Domain Controller." The solution is to use the Run Command to reset the local administrator password.