Sunday, May 26, 2024

Run YAML Pipeline Stages Based on Dynamic Variable Values

YAML pipeline conditions can be utilized to generate pipelines that meet various criteria, such as dependencies between stages and determining whether a stage should be run or not. In this blog post, we will learn how to run stages based on dynamically generated variables.

Pre-requisites: Azure DevOps Account

Monday, May 20, 2024

Share Dynamic Variables Between Azure DevOps Stages

This blog post explains how to generate dynamic variables while running Azure DevOps tasks and how to utilize them in subsequent tasks in dependent stage.

Prerequisites: Azure DevOps account

The following YAML pipeline consist with two stages called GenerateGuid and PrintGUID

1. Two GUIDs are generated within Job1 in GenerateGuid stage and are designated as output variables using the script below. 'demovariable01' is the dynamic variable name.           

Wednesday, April 17, 2024

Utilize Deployment Group Job in YAML Pipeline

Azure DevOps deployment pipelines offer three types of jobs: agent job, deployment group job, and agentless job. However, YAML pipelines require an alternative approach as they lack direct support for deployment group jobs. Virtual machine resources in environments are utilized to achieve similar functionality as deployment groups, and this blog explains how to do it.

Prerequisites:

  • Azure DevOps environment provisioned with virtual machine resources.
  • Fundamental understanding of pipeline configuration

As a prerequisite, an environment called Test-dev has been provisioned and a virtual machine has been added to it.

Sunday, March 31, 2024

Bringing Role Assignments into Terraform State Management

Terraform is an infrastructure automation tool that keeps track of the state of your infrastructure managed by Terraform in a state file. It serves as a snapshot of the actual infrastructure. Therefore, Keeping Terraform state file up to date is crucial. If a new resource added or any manual changes are made to the actual resource, it is important to import those changes into the state file. This blog explains how to import manually added role assignment to the terraform state file.

Pre-requisites: Manually add User Access Administrator Role to the Azure resource group.

Friday, February 23, 2024

Customizing Next.js Port Configuration

Next.js is a React Web development Framework that is particularly popular among frontend developers. This blog will share small but useful tip for Next.js users.

By default, Next.js utilize port 3000. However, if the port is already allocated to another service, it's possible to change the port used by of Next.js to different one. Following is a step-by-step guide on how to change the default port of a Next.js project.

Prerequisites: Next.js project

Saturday, February 3, 2024

Share Dynamic Variables Between Azure DevOps Jobs

Azure DevOps pipelines can be defined with multiple jobs based on the final result to be achieved and specific requirements. There may arise situations where variable values need to be dynamically generated within one pipeline job and utilized in another subsequent job. This blog explains the process of achieving such functionality.

Prerequisites: Azure DevOps account

Sunday, January 21, 2024

Multi configuration build with GitHub Action Matrices

Testing is a crucial part of software development, and there are several kinds of testing performed by software development teams. Configuration testing is one type of testing that verifies the performance of a system under different configurations. This blog explains how to use GitHub Actions Matrices to build the code with different configurations.

GitHub actions matrices allow to use of variables in a single job definition to create multiple jobs with different configurations. 

Wednesday, December 20, 2023

Restoring a Deleted Branch in Azure DevOps

Following a branching strategy is useful to ensure smooth version control and deployments. Based on the nature of the project and other operational considerations, organizations define several branches in their version control systems. However, what if you accidentally deleted an important branch from the version control system? This blog explains how to recover a deleted branch in Azure DevOps

Prerequisites: Azure DevOps project with multiple branches. In this blog, I will use main branch and two branches named releases/1.0.0 and releases/1.0.1