Thursday, 19 December 2019

Resolving Issues with | Symbol in PowerShell While Creating Node Web App in Azure CLI

You can use Azure Command Line Interface with PowerShell to create infrastructure as code (IaC) scripts, for implementing deployment of resources in Azure platform services. When you try to create a web app in Azure with run time specified with Azure CLI in PowerShell, | symbol used in runtime specification causes issues as it is trying to do a pipe operation in PowerShell. Let’s look at the issue and how to get it resolved in PowerShell and Azure CLI based IaC scripts.

Saturday, 14 December 2019

Replacing iOS .plist Array Properties in Azure Release Pipelines

.plist files are used by iOS applications to keep configuration properties. These files support arrays as configurations. In deployment process of Azure DevOps pipelines you may want to update these plist files to have values relevant to the target deployment environments. Let’s see usage of plistbuddy utility to update array items in plist files as the plutil (http://scriptingosx.com/2016/11/editing-property-lists/) is unable to apply the changes.

Thursday, 5 December 2019

Building Code from Multiple Repos with YAML Pipelines

You could only build code from a single repo using classic build pipelines in Azure DevOps. Now with multiple repo support added to YAML build pipelines (pipeline as code), you can decide which of the repos you want to checkout and build, in a single pipeline build sequence. Let’s see the steps in detail.

Sunday, 1 December 2019

Implementing Simple and Effective Branching and Deployment Strategy with Azure DevOps

In the previous post, we have discussed, a simple and effective branching and deployment strategy as a concept. Let’s now have a look at key implementation considerations of the proposed strategy with Azure Git repos and Azure Pipelines.
Let’s have a look at pictorial representation of the proposed strategy first.

Saturday, 30 November 2019

Simple and Effective Branching and Deployment Strategy

While using Git repos there many standard branching strategies teams follow. With this post let’s discuss a simple to understand and execute branching and deployment strategy, which supports most of the requirements, a software development and delivery team requires. The following implementation is considering the Azure Git Repos and Azure Pipelines in Azure DevOps. However, you might be able to implement the same with other Git repos and CI/CD tools.

Tuesday, 26 November 2019

Define Variables Dynamically and Use Them in Subsequent Steps in Azure DevOps Pipelines

You normally define variables in Azure DevOps pipelines in the pipeline definition or using variable groups. However, there might be situations in a given step in your pipeline you might want to set a variable with a value from external source. You do not have to define such variables in your release definition or in a variable group added to the definition. You can obtain the value from external source and dynamically define the variable, so that it can be used within the agent job. Let’s look at the steps to achieve this.

Thursday, 21 November 2019

Getting Started with Secure DevOps Kit for Azure

Security is important aspect of any software development project. DevOps is essential part of software development. Improving security measures of software development, delivery and deployment is now can be enhanced with Secure DevOps kit for Azure. This security kit comes with PowerShell unitalities as well as CI CD extensions etc. for securing your software projects. Let’s explore the Secure DevOps Kit with couple of posts. In this first post let’s look at an overview as well as how to get started with Azure Subscription health scans using PowerShell utilities.

Thursday, 7 November 2019

Resolving “ERROR: There was a conflict. The remote server returned an error: (403) Forbidden.” While Creating Function App in Azure in IaC

You can use Infrastructure as code (IaC) to create resources in Azure and use that in the Azure DevOps pipelines. However, if you are using IaC create an Azure function where the storage account of the function is added to Virtual Network (vnet in Azure) you may run into the issue ERROR: There was a conflict. The remote server returned an error: (403) Forbidden. To fix this issue you can set the storage account to allow any network while deploying function app and then reapply the restriction on storage access. Let’s see the cause of the error and how to resolve as the error message is really misleading.

Monday, 28 October 2019

Rollup Columns in Azure DevOps Boards

Azure Boards in Azure DevOps facilitate project planning and management with agility. The rich feature set and extensibility of Azure Boards with project level customizations as well as process template level customizations helps a lot to manage the projects effectively. The new feature rollup columns help you to visualize progress of the project work based on various criteria using the default fields as well as custom fields. Let’s have a quick look at options available with the new feature roll up columns in Azure Boards.
To add rollup columns in Azure Boards, navigate to Backlog section and select a backlog level such as User Stories backlog. Then click on Column Options.

Monday, 14 October 2019

Import BitBucket Cloud Repo to Azure Git Repo

Azure DevOps being a comprehensive Application Lifecycle Management tool provides Azure Git Repos as the distributed version control system which can be easily integrated with, Azure Boards to track requirements, and Azure Pipelines and Azure Tests, implement build and deployment automations as well as test management and test automation. If you are already a BitBucket cloud git repo user you may want to move your repos in BitBucket could to the Azure Git Repos to get the advantages it offers, with totally integrated set of Azure DevOps features. Let’s look at the steps required to import a BitBucket cloud repo with history to Azure Git Repos.

Wednesday, 25 September 2019

Resolving Azure DevOps Build Error “data at the root level is invalid” in dotnet test

When you try to execute dotnet test with test assemblies in Azure DevOps builds built with Visual Studio 2019 you may run into an error “data at the root level is invalid”. Let’s look at how to solve this issue and get the tests executed in the Azure DevOps build pipelines.

Wednesday, 18 September 2019

Using VS Code Extension for Azure Pipeline–Part1

Visual Studio Code is becoming a popular code editing tool in all platforms, Recently VS Code was added with Azure Pipeline extension which can generate YAML based pipeline code. The extension assists in writing YAML pipeline code providing IntelliSense. Let’s look at how we can get started with the Azure Pipeline extension to generate a YAML base pipeline.

Saturday, 31 August 2019

Setting Up Az Module to Write IaC for Azure

Microsoft has deprecated the AzureRM PowerShell module and introduced new Az PowerShell module for Azure. Bug fixes and support will be available for AzureRM module until December 2020. However, it is better starting migrating any AzureRM based PowerShell scripts which you have written to achieve Infrastructure as Code (IaC) for Azure. For this purpose, you can setup the Azure Az Module in your machine while allowing the AzureRM commands to still work using alias. Let’s look at the steps of setting up Azure Az Module in a machine where Azure RM is already setup.

Sunday, 25 August 2019

Creating an Azure Web App Supporting .NET Core 3 – IaC with Azure Pipelines


We have discussed how to build a .NET Core 3 Web Application in the previous post. In order to deploy a .NET Core 3.0 Web App to an Azure Web App, you need to install .NET Core 3.0 Extension to the Azure Web App. You can easily add .NET Core 3.0 via Azure Portal to a Web APP. However, if you are really into automating your infrastructure as code (IaC) you may want to make all these steps automated and executed via a deployment pipeline. Let’s look at a script which is using Azure CLI and Azure PowerShell to fully automate creation of a .NET Core 3.0 enabled Azure Web App.
You can download the full script from here. Let’s understand each part of the script.

Thursday, 1 August 2019

Build .NET Core 3.0 Projects with Azure DevOps Pipeline Using Hosted Agents

.NET Core 3.0 is still in preview 7 and some of you may have already started developing projects with it. Implementing CI/CD is important to any project regardless of whether you are using bleeding edge technology or not. It is possible to setup your own build server with the required preview components setup a builds. However, if you can utile the hosted agents in Azure DevOps Services that would remove the burden of maintaining your own build server. Hence, let’s look at the steps required to build a .NET core 3.0 application with hosted 2019 agents.

Sunday, 28 July 2019

Customizing Columns in Your Azure DevOps Sprint/Task Boards

Kanban flow of the Azure Boards for user stories, features or other top level back log boards was a feature available in Azure DevOps Boards for a long time. However, it was not possible to change the sprint board columns in Azure DevOps, without introducing new states to Task work item or any work item which is using sprint board previously. This long awaited community request has been now completed and available in Azure DevOps services. Azure DevOps on-premise server does not have this feature we can hope it would be added to the on-premise server eventually. Let’s look at how we can customize the columns in the Sprint boards with this new feature.

Saturday, 27 July 2019

Resolving 'NoneType' object has no attribute 'azure_services' While Setting a Network Rule to Azure Key Vault

As infrastructure automation is vital aspect of DevOps, you might want to setup an Azure Key Vault to use a Subnet in a vnet, programmatically. For this you can use Azure Command Line Interface (CLI) and you may run into an error 'NoneType' object has no attribute 'azure_services'. Let’s have a look at how to get this issue resolved.

Sunday, 7 July 2019

Fixing Azure DevOps Xamarine Build error XA5300: The Java SDK Directory could not be found

When you try to build xamarine android projects with Azure Pipelines hosted agent Windows 2019 with VS2019 you might encounter error “XA5300: The Java SDK Directory could not be found”, if you are using a visual studio build task or msbuild task to build a solution which includes android projects. This is caused due to the inability to find the java sdk in the hosted agent. Let’s see how we can get this issue fixed.

Wednesday, 22 May 2019

Controlling Pull Request Source Branches for Given Target Branch in Azure Git Repos

Generally you can create pull request from any given source branch to a any given target branch in Azure Git repos. You can setup a pull request validation build which evaluates the repo state, by performing a pre merge in the build server to ensure, your repo build succeeds after the pull request is merged to the target branch. You can set the branch policies so that the pull request cannot be merged to a given target branch if the validation build fails or if the approvers not approve the pull request. However, you might want to follow a branching strategy, which requires you to control from which branches a pull request can be created and merged to a targeting branch. The purpose of controlling the pull request source and target would be to assure your team is adhering to a defined branching and merge strategy. Let’s look at using a task in pull request validation build to ensure the request is coming from an allowed/valid branch, and make the build to fail if it is coming from an invalid branch.

Saturday, 18 May 2019

Join a Personal Azure DevOps Organization to a Company Domain

You might have started using Azure DevOps using Microsoft accounts. Later you may have established a company and may want to move the current Microsoft account based Azure DevOps organization to work with your company active directory users. Let’s look at the steps required to join a personal Microsoft account based Azure DevOps organization to a company domain.

Thursday, 9 May 2019

Azure DevOps Service Connection for an Azure Subscription in Another Azure AD

Adding Azure Subscription to Azure DevOps  as service connection is really simple when you have the same account you are using for Azure DevOps associated with your Azure Subscription. However, this may not be the case always and you may want to deploy to resources in a Azure Subscription which is not related to your Azure DevOps organization. Let’s see how to create a service connection in such situation to utilize it in a deployment pipeline.

Thursday, 11 April 2019

Setting a Release Variable to Make It Available to Other Stages in Azure DevOps Release Pipeline

You can easily set a variable in a build or release pipeline by executing “##vso[task.setvariable variable=variablename;]variablevalue” . This sets the variable for the scope of a given stage in a release pipeline. However, it does not allow you to set a variable in the scope of a release. That means if you want to set a variable value in stage and then use it in subsequent stages it is not possible to do it with  ##vso[task.setvariable . Let’s look at achieving this need using Azure DevOps REST API.
The script available here can be used for this purpose. A slightly modified version of the script to support release pipeline and enable sending any variable name and value for updating a value of a given variable can be found here.

Monday, 25 February 2019

Getting Started with Azure DevOps Command Line

Using command line to work with Azure related resources can be done easily using Azure CLI. Now there is an extension to Azure CLI allowing you to work with Azure DevOps. Let’s have a quick look at how to get it setup and use it for few operations.

Thursday, 31 January 2019

Copying a Build Definition to Another Team Project in a Different Azure DevOps Organization

You can easily clone a build and create a new build definition in the same team project. This is useful when you have similar type of applications to be built. However, if you want to clone a build definition to another team project, or for that matter to a different Azure DevOps Organization, you cannot use the clone as it always creates it in the same team project. For task groups you can use import and export to get them copied over to a different team project or even to  a different team project in a different Azure DevOps organization. Let’s look at how to export and import a build definition from a team project into a different team project in a different Azure DevOps organization.

Wednesday, 30 January 2019

Pull Request Report for Azure Git Repos

When you have several repos in your team project and if you want to obtain a report of pending pull requests, or even completed pull requests, you can use widget available here in your dashboards.Additionally pull request count widget also available in here. Individual repo based pull request dashboard widget also available in Azure DevOps. However, if you want a custom report, you can use REST API and create your own report.

Sunday, 6 January 2019

Deploying ASP.NET Core App to Azure Kubernetes Services (AKS)–Setting Up Azure DevOps Pipeline Manually–Step By Step Guide–Part 2

In the part 1 of this post, enabling Docker support for ASP.NET Core app and building and pushing the Docker image to Azure Container Service, using Azure DevOps build pipeline with simple steps was described. The image is tagged with the build Id and it is pushed to the Azure Container Registry, so that it can be later deployed to a container orchestrator to run the container. Helm is used to get he deployment done to AKS via Azure DevOps when creating a an ASP.NET Core App, Container Registry and AKS, then getting it deployed automatically with few clicks using Azure Projects as described in the post “Deploy ASP.NET Core App to AKS with Azure DevOps Project”. Let’s look at getting the container image in Azure Container Registry deployed to AKS with three simple steps without using Helm, with Azure Pipelines.

Popular Posts