Saturday, November 21, 2020

Sharing Service Connection To Multiple Team Projects

 Azure DevOps has a feature where it can connect with external tools via service connection which allows easily integrate multiple tools required for your project development and deployment purposes. However, when you have multiple Azure DevOps team projects and dedicated service connection for each project, it is not easy to manage service connections. As a solution for this, Azure DevOps has introduced secured and shared service connection between projects. As example, if  the team has one azure subscription for development purposes, they can connect with azure using one shared service connection between Azure DevOps projects.

You can find this feature in Azure DevOps settings section. Go to Azure DevOps settings and select service connections under pipeline section. You can add new service connection or edit existing connection from this page. We use existing service connection to explain the feature in this blog post. Go to security section of the selected service connection.

Wednesday, November 18, 2020

Push Azure DevOps NuGet Packages to GitHub Packages via Azure DevOps Pipelines

 Azure DevOps has two mechanisms to keep deployable packages. One is publish to pipeline itself and other way is publish to Azure DevOps artifacts feed. We can publish deployable out come of the build pipeline to Azure DevOps feed as NuGet packages. However, integration capability of modern software allows us to share these packages between different tools. This post will explains how to push a  NuGet package in Azure DevOps feed to GitHub via Azure DevOps pipelines.

Prerequisites: 

  1.                 NuGet package publish to  Azure DevOps feed
  2.                 GitHub PAT

Let's get started.

  • Create Azure DevOps deployment pipeline by selecting empty template.
  • Add build pipeline as the artifact to the deployment pipeline which is necessary to set continuous deployment triggers.

Tuesday, November 3, 2020

Azure VM generalize image backup and restore

This blog explains how to get a generalize image backup of Azure VM and restore it. While Azure VM is up and running, VM incur cost due to processing power and disk usage. As a solution to this, if there is an Azure VM in an idle state we can make a VM image out of it including all the configurations of the VM and remove the VM. Hence, the cost can be reduced as the VM image is stored in the storage and it costs for the storage.

Let's get started

Tuesday, October 27, 2020

Trigger an Azure Build Pipeline Based on Changes in Multiple Azure Git Repos

While we are working in the projects, there can be common tools or utilities developed which are shared with the multiple projects. When developing such projects using Azure DevOps Repos as source control, we can keep common utilities in one repo and other projects in separate repos. However, while we developing utilities in separate repo, once any change done to the utilities, other projects which refer this utility should be get acknowledge and should be able to work with the latest utilities. Hence, once new change done to the utilities code, other dependent projects builds should get triggered automatically and build deployable package with latest utilities version.

Azure DevOps has a feature where you can trigger a build pipeline once a change is done to another repo other than the main code repo. That would help us to achieve the above-mentioned challenge. This post discusses how to trigger a build pipeline due to the code push done to the multiple repos.

Monday, October 19, 2020

Fix Service Connection Configuration Failure in Azure DevOps and Jira Integration

While working in the modern software development teams, you would have teams don't stick to one tool as they always try to use more tools if the tools can integrate with each other. Jira is one of the most famous team/project management tool and Azure DevOps is mostly famous as a CI/CD tool. If a team use both of the tools, it is better to have link between tasks in the Jira and deployments in the Azure DevOps team projects. This blog explains how to integrate Jira and Azure DevOps, further, discuss the issues faced when integrating the two tools and how to solve the issues.

  • Let's go to Azure DevOps and check possibility to create a service connection to Jira. You would be able to find the Jira in the service connection type list, however, you would be able to see save button of the service connection creation process disables even after enter the values. It doesn't allow to create the service connection between two tools.

Saturday, October 17, 2020

Link Jira Issues with Azure DevOps Deployment

In the previous post we have discussed how to create a service connection between Jira and Azure DevOps. Since, project management tasks and deployment done using two different tools, It is very useful to have a link between the tools to easily track the deployment progress of the each process explain in Jira issue. This post explains how to link Jira work items and Azure DevOps deployment pipeline.

Pre requites:

  1.  Azure DevOps Repo with a code sample.
  2.  Azure DevOps continuous integration and deployment pipelines to deploy code changes to target platform.
  • Open Azure DevOps deployment pipeline in the edit mode.
  • Go to integration section in options section of the Azure DevOps deployment pipeline. 

Thursday, October 1, 2020

Getting Started with Azure Scale Set Agents

Azure DevOps pipelines use hosted agents or private agents to run the build steps. However, while using the private agents one of the main challenges faced by the users is cost of the agents. As a solution to this we can use Azure Scale set agents as describe in this post. Scale set will create agents on demand and destroy them after use.
  • First create a VM with all the required software installed in it.
  • Open Azure Cloud Shell and execute following commands.
    • Run following command to select relevant subscription if you have multiple subscriptions.

Wednesday, September 30, 2020

Prioritizing Waiting Jobs in Azure Pipelines

While we are working with Azure DevOps pipelines for build and deployment purpose, we use several private and hosted agents. However, sometimes there are more CI and PR builds in the queues due to limited number of parallel job availability. While we do daily tasks, there can be situations where we need to release a bug fix quickly but pipelines have long queues. At that type of situation, team has to wait prior until all the builds on the queue get completed. This blog explains the feature available in Azure DevOps as a solution to this issue.

Go to the build logs of the build pipeline which need to be started next. In the logs you would be able to see the position of the current  build . As the following image the selected build is 4 th in the queue. We can click on the "Run next" to queue this build next as priority.