Azure DevOps yaml files for piplines can be created as templates to avoid duplicating same set of tasks in multiple areas of the pipelines. For GitHub actions workflow, we have seen here in "Build and Unit Tests for .NET Apps with GitHub Actions" the same steps are repeated in both Windows and Linux, build and unit test run. The solution to avoid duplicating same steps in multiple jobs in a GitHub actions workflow is the usage of composite actions. Let's modify our workflow implemented in "Build and Unit Tests for .NET Apps with GitHub Actions" to use composite action to build and unit test, and reuse that in both Windows and Linux job.
Thursday, 7 September 2023
Saturday, 2 September 2023
Running Pod Counts for All Services Summary - Grafana Chart with Azure Monitor for AKS
Expected Outcome
Each service actual scaling over time is shown as summary. This indicate based on load how each service in your application scale out based on the demanded by horizontal pod autoscaler.
Wednesday, 23 August 2023
Build and Unit Tests for .NET Apps with GitHub Actions
Executing unit tests and viewing results in unit tests in a build pipeline is essential to keep high quality in an application deployment via any pipeline system. GitHub actions are the way forward to implement pipelines with repositories in GitHub. Let's explore how to run unit tests and view results in GitHub actions workflow.
Monday, 14 August 2023
Importing a Git Repo with LFS (Large Files) to Azure GIt Repos
Importing a git repo to Azure DevOps Git is straight forward using the Azure DevOps portal. However, if the importing repo has large files with git lfs then the cloning of the repo after import fails due to the large files are not imported. Let's see how to get the large files fixed for the imported repo.
Saturday, 29 July 2023
Using Object Type Azure DevOps YAML Pipeline Parameter in PowerShell Task
Using a YAML pipeline paramter in a PowerShell task is straight forward for types such as string. For example, if there is a YAML pipeline parameter named env of type string, we can read it in PowerShell task with $envName = '${{ parameters.env }}; without any issue. However, if the parameter is type of object we cannot read, the paramter the same way we do with string parameters. If we try to read object parameter named apps, $apps = '${{ parameters.apps}}; , there will be an YAML validation error staring the pipeline such as below.
/azure-pipelines.yml (Line: 57, Col: 23): Unable to convert from Array to String. Value: Array
Even if we try to use below it will be same issue.
[String[]]$apps = '${{ parameters.apps}};
[PSObject[]]$apps = '${{ parameters.apps}};
Let's explore the issueand solution in detail.
Saturday, 22 July 2023
Mapping SQL Database SKU Bicep Specs with Available SKUs in a Region
How to fnd SKU information for SQL databses is documented here. The command suggested to use is az sql db list-editions -l region -o table . This would provide available list of SQL database SKU optons to chose form for a given region. However, the headings and parameters required in bicep is bit confusing to figure out intially. Let's look at how to map values for available SKUs provided by az sql db list-editions -l region -o table command, and parmeters in Bicep SKU for SQL database.
Saturday, 15 July 2023
Ensure Azure App Config Refresh for Keyvault Secret Updates in Terraform
Keyvault secrets can be used in Azure app conciguratoins and can be setup with terraform. However, if the secret is modified then modified secret reference is not get updated to the app configuration. There are two ways to fix this issue in terraform. Let's explore them.
Thursday, 13 July 2023
Fix Terraform Azure AD App Registration (SPN) Read Permssions Running with Azure DevOps Pipelines
Azure DevOps use service principals (SPN or Azure AD app registration) to make a service connection to Azure to be able to run Terraform or other IaC based resource deployments targeting Azure. You may run into issue while trying to read another Azure AD app registration information, within terraform. For example consider below code segment.
Popular Posts
-
Let’s look at how we can specify the artifact version to download based on the resource CI build linked to the CD pipeline and check on how ...
-
The hosts file in /etc/hosts is allowing the WSL distros to map IP addresses to domain names before going to domain name servers, similar...
-
Can a Coded UI test executed with a Console Application? Yes it is possible. I am going to explain how it can be done. I am going to exec...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
-
The new Azure Managed Redis can be deployed with balanced compute and memory with high availability, and useful modules such as RedisJson a...