Editing multiple files in the Azure DevOps UI and committing them in a single commit

One of the most useful, and it seems relatively unknown, features in the GitHub web UI is the ability to edit multiple files in the UI and commit them in a single commit. This is done by loading VS Code in the browser when in the code view by pressing . (the full stop) The reason I find this so useful is that it allows me to make a series of small related changes to a project without having to clone the repository or using a CodeSpace, very useful when editing the related YAML files of reusable workflows in GitHub Actions....

October 18, 2024 · 1 min · Richard Fennell

Generating Visual Studio SQL Database Projects from the command line

This is is one of those posts I write so I remember how to do something in the future. Background I recently had a need to generate many Visual Studio SQL Database Projects from existing databases. Being a good ’lazy developer’ I wanted to do this from the command line so I could automate the process, but it took me far to long to work out how The Manual Way If you only have one database to import you can do this manually by using the Import option in Visual Studio for an individual SQL Database Project....

September 27, 2024 · 2 min · Richard Fennell

Why are my Azure DevOps Pipeline cache hits missing

I have blogged in the past about Caching NVD Vulnerability Dependency data on hosted Azure DevOps Pipeline agents. Using the cache is a great way to speed up slow builds. However, today I was surprised to find I was getting cache misses on my pipeline, even though I was sure the cache should have been hit. There are rules over how the cache is used: The cache is specific to a pipeline definition, so there is no sharing of the cache between pipeline definitions The cache is only created if the pipeline is successful (running the post run tasks) The cache only lasts 7 days but what I had not realised was the cache is also specific to the branch in a not so obvious way....

June 5, 2024 · 2 min · Richard Fennell

Personal Access Tokens (PATs) are not your friends

Background Programmatic connection to Azure DevOps cannot be done with your Active Directory credentials. This is because this involves a dialog being shown, and these days usually an MFA check too. Historically, the solution to this problem was to enable Alternate Credentials, which could be passed as username and password, without the dialog being shown. However, the use of these has been deprecated since 2020, and they have been completely removed since Jan 2024....

March 22, 2024 · 3 min · Richard Fennell

Don't forget to commit your configuration file

It is a major effort, often unfortunately ignored, keeping the dependencies in an open source project up to date. This was highlighted in Jesse Houwing’s post on the state of the Azure DevOps Marketplace. Since reading this I have made much more of an effort to keep my Azure DevOps Extensions up to date. Dependabot generated PRs have been a great help in this regard. Creating PRs for vulnerabilities and out of date dependencies....

March 20, 2024 · 1 min · Richard Fennell

Parsing error with Azure Bicep files in SonarQube

The Issue We saw an issue with our SonarQube 10.3 Developer Edition (that is running as a Docker image hosted in Azure) when it was doing the analysis of a project that included Azure Bicep files. The Azure DevOps pipeline that triggered the SonarQube analysis was not failing, but within the SonarQube analysis step an error was reported in the task log INFO: Sensor IaC AzureResourceManager Sensor is restricted to changed files only INFO: 1 source file to be analyzed ##[error]ERROR: Cannot parse 'AzureServices/QueryPack....

March 19, 2024 · 2 min · Richard Fennell

Site fails to render when updating Hugo version

The Issue This site was built using Hugo, a static site generator. I recently tried to do a long overdue update the version of Hugo from 0.108 to the current 0.122 version. I had not expected any problems, but found that the site failed to render, but with no error message all I saw was hugo.exe server --logLevel info Start building sites … hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended windows/amd64 BuildDate=2024-01-26T15:54:24Z VendorInfo=gohugoio INFO copy static: syncing static files to \ INFO build: running step "process" duration "97....

February 16, 2024 · 2 min · Richard Fennell

Getting a BadGateway error when trying to create Azure DevOps Work items using Power Automated

I was recently trying to create an Azure DevOps work item when an email is received using the Power Automate ‘Create an Azure DevOps work item when email arrives with ‘Bug’ in subject’ template. The flow created without issue, and all the drop downs were correctly populated with O365 and Azure DevOps values as expected. However, when the flow ran, on receiving an email to the correct inbox, it failed with a BadGateway error....

February 13, 2024 · 2 min · Richard Fennell

SonarQube Docker Container will not start

The Problem We run our SonarQube instance in a Docker container hosted in an Azure Web App Service. Today, with no notice, it failed. We did the obvious, just tried to restart it and the startup process failed. Looking at the Azure Web App’s Log Stream we could see the following error repeated on each restart attempt 2023-09-27T15:30:00.797Z INFO - Starting multi-container app.. 2023-09-27T15:30:01.024Z INFO - Pulling image: sonarqube:10.1-developer 2023-09-27T15:30:02.100Z INFO - 10....

September 27, 2023 · 2 min · Richard Fennell

Moving my Azure DevOps Pipeline generated social posts to Azure Logic Apps

I posted a while ago about how I had automated the generation of social media posts for my static Hugo based website using Azure Logic Apps. The other place I auto-generate social media posts is from releases via my project’s Azure DevOps Pipeline builds. These use a YAML Pipeline Template that calls a Marketplace task to post to Twitter and a PowerShell task to Invoke-WebRequest to post to Mastodon. Recently the Twitter task started to fail, and given the recent changes to the Twitter API with the move to the V2 API, I decided a new solution was required....

April 25, 2023 · 2 min · Richard Fennell