Pinning specific Azure DevOps task versions

I make every effort keep all my Azure DevOps Pipeline extensions reliable as I know they are used by many people, but mistakes happen. Yesterday I released an updated version of my ReleaseNotes task that introduced a bug if the pipeline produced no artifacts. I am pleased to say I have fixed the bug, and addressed this gap in my test coverage. However, this did mean for about 12 hours if you are using this task in a pipeline that did not produce artifacts, maybe one that just deployed consumed artifacts from other pipelines, you had a failing pipeline....

March 8, 2023 · 1 min · Richard Fennell

Getting x86 .NET 3.x tests running on the latest Azure Devops hosted agents

Background At Black Marble we have our own private build agents, but they are built using the same Packer process as the Microsoft hosted ones. I recently rebuilt our agents to match the latest version of the hosted agents, and I ran into an issue with some .NET 3.1 based x86 MSTests. The tests were failing with the following error: A total of 34 test files matched the specified pattern. ##[error]Testhost process exited with error: A fatal error occurred....

March 6, 2023 · 2 min · Richard Fennell

Getting "cannot find path" error using Install-Package

Background I was recently trying to use PowerShelGet Install-Package to install a module from an Azure DevOps Artifacts hosted PowerShell Gallery using the following script # For authentication use a PAT as the password, UID can be anything $PATcreds = Get-Credential Register-PSRepository -Name BM -SourceLocation 'https://pkgs.dev.azure.com/<org>/_packaging/PowerShell/nuget/v2' -PublishLocation 'https://pkgs.dev.azure.com/<org>/_packaging/PowerShell/nuget/v2' -InstallationPolicy Trusted Install-Package BlackMarble.Package -Source BM -Credential $PATcreds The script did not work I was getting the error Install-Package : Cannot find the path ‘C:\Users<user>\AppData\Local\Temp\936930114\BlackMarble....

February 27, 2023 · 1 min · Richard Fennell

What happens when you link an Azure DevOps Variable Group to an Azure Key Vault?

Background It is a really useful feature that you can expose Key Vault stored secrets as Azure DevOps pipeline variables via a variable group, but what happens when you do this? And what can you do if you try to expose too many variables? I was recently working on a system where there was an increasing number of Key Vault secrets that were being exposed as variables via a variable group....

February 13, 2023 · 2 min · Richard Fennell

Handling return values from Azure Functions in Hugo static website

Background I am using an Azure Function as backend for processing forms submissions from a Hugo static website, to process a simple contact form. I wanted to add reCAPTCHA support, as the site was generating too many spam emails. I also wanted to show a different confirmation pages depending on whether the reCAPTCHA check passed or failed There a good few posts about using an Azure Function as backend for a static web site form....

January 20, 2023 · 4 min · Richard Fennell