How can I automatically create Azure DevOps Release Notes and how can I publish them?

A question I am often asked when consulting on Azure DevOps is ‘how can I automatically create release notes and how can I publish them?’. Well it is for just this requirement that I have written a set of Azure DevOps Pipeline Tasks Release Note Generator - to generate release notes. I strongly recommend this Cross-platform Node-based version. I plan to deprecate my older PowerShell version in the not too distant future as it uses ‘homegrown logic’, as opposed to standard Azure DevOps API calls, to get associated items. Wiki Updater - to upload a page tot a WIKI. WIKI PDF Generator - to convert a generated page, or whole WIKI, to PDF format. So lets deal with these tools in turn ...

September 15, 2020 · 4 min · Richard Fennell

Fix For: ‘The pipeline is not valid error: Unable to resolve latest version’ on an Azure DevOps YAML pipeline

The Issue I have an Azure DevOps multi-stage YAML pipeline that started giving the error `The pipeline is not valid error: Unable to resolve latest version for pipeline templates: this could be due to inaccessible pipeline or no version is available` and failing instantly. The Solution This is not the most helpful message, but after some digging I found the problem. The pipeline used another pipeline as a resources ...

August 27, 2020 · 1 min · Richard Fennell

Exporting Release Notes and WIKIs as PDFs using a new Azure DevOps Extension that wrappers AzureDevOps.WikiPDFExport

A common question I get when people are using my Release Notes task for Azure DevOps is whether it is possible to get the release notes as a PDF. In the past, the answer was that I did not know of any easy way. However, I have recently come across a command line tool by Max Melcher called AzureDevOps.WikiPDFExport that allows you to export a whole WIKI (or a single file) as a PDF. Its basic usage is ...

August 27, 2020 · 2 min · Richard Fennell

Using the Post Build Cleanup Task from the Marketplace in YAML based Azure DevOps Pipelines

Disks filling up on our private Azure DevOps agents is a constant battle. We have maintenance jobs setup on the agent pools, to clean out old build working folders nightly, but these don’t run often enough. We need a clean out more than once a day due to the number and size of our builds. To address this, with UI based builds, we successfully used the Post Build Cleanup Extension. However since we have moved many of our builds to YAML we found it not working so well. Turned out the problem was due to the way got source code. The Post Build Cleanup task is intelligent, it does not just delete folders on demand. It check to see what the Get Source ‘Clean’ setting was when the repo was cloned and bases what it deletes on this value e.g. nothing, source, or everything. This behaviour is not that obvious. In a UI based builds it is easy to check this setting. You are always in the UI when editing the build. However, in YAML it is easy to forget the setting, as it is one of those few values that cannot be set in YAML. To make the post build cleanup task actually delete folders in a YAML pipeline you need to ...

August 19, 2020 · 2 min · Richard Fennell

Zwift and the joys of home networking

During the Covid 19 lock down I have been doing plenty of Zwift‘ing. However, I have started having problems getting the Zwift Companion App working reliably, when it used to work. Basically, Zwift itself was fine, though very slow to save when exiting, but the companion app could not seem to detect that I was actively Zwift’ing, but it’s other functions were OK. After much fiddling I found the issue was the network connection from my PC up to Zwift and nothing to do with the phone app. But in case it is of any use to others here are the steps I took to ...

July 13, 2020 · 3 min · Richard Fennell

Timeout Errors 'Extracting Schema' when running SQLPackage for a Migration to Azure DevOps Services

The Problem Whilst doing a migration from an on-premised TFS to Azure DevOps Services for a client I had a strange issue with SQLPackage.exe. I had previously completed the dry run of the migration without any issues and started the live migration with a fully defined process and timings for a each stage. When I came to export the detached Team Project Collection DB I ran the same command as I had for the dry run ...

June 25, 2020 · 2 min · Richard Fennell

Fix for ‘System.BadImageFormatException’ when running x64 based tests inside a Azure DevOps Release

This is one of those blog posts I write to remind my future self how I fixed a problem. The Problem I have a release that installs VSTest and runs some integration tests that target .NET 4.6 x64. All these tests worked fine in Visual Studio. However, I got the following errors for all tests when they were run in a release 2020-04-23T09:30:38.7544708Z vstest.console.exe "C:agent\_workr1aPaymentServicesdroptestartifactsPaymentService.IntegrationTests.dll" 2020-04-23T09:30:38.7545688Z /Settings:"C:agent\_work\_tempuxykzf03ik2.tmp.runsettings" 2020-04-23T09:30:38.7545808Z /Logger:"trx" 2020-04-23T09:30:38.7545937Z /TestAdapterPath:"C:agent\_workr1aPaymentServicesdroptestartifacts" 2020-04-23T09:30:39.2634578Z Starting test execution, please wait... 2020-04-23T09:30:39.4783658Z A total of 1 test files matched the specified pattern. 2020-04-23T09:30:40.8660112Z X Can\_Get\_MIDs \[521ms\] 2020-04-23T09:30:40.8684249Z Error Message: 2020-04-23T09:30:40.8684441Z Test method PaymentServices.IntegrationTests.ControllerMIDTests.Can\_Get\_MIDs threw exception: 2020-04-23T09:30:40.8684574Z System.BadImageFormatException: Could not load file or assembly 'PaymentServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. 2020-04-23T09:30:40.8684766Z Stack Trace: 2020-04-23T09:30:40.8684881Z at PaymentServices.IntegrationTests.ControllerMIDTests.Can\_Get\_MIDs() … 2020-04-23T09:30:40.9038788Z Results File: C:agent\_work\_tempTestResultssvc-devops\_SVRHQAPP027\_2020-04-23\_10\_30\_40.trx 2020-04-23T09:30:40.9080344Z Total tests: 22 2020-04-23T09:30:40.9082348Z Failed: 22 2020-04-23T09:30:40.9134858Z ##\[error\]Test Run Failed. Solution I needed to tell vstest.console.exe to run x64 as opposed to it’s default of x32. This can be done with a command line override –platform:x64 ...

April 23, 2020 · 1 min · Richard Fennell

Swapping my Azure DevOps Pipeline Extensions release process to use Multistage YAML pipelines

In the past I have documented the build and release process I use for my Azure DevOps Pipeline Extensions and also detailed how I have started to move the build phases to YAML. Well now I consider that multistage YAML pipelines are mature enough to allow me to do my whole release pipeline in YAML, hence this post. My pipeline performs a number of stages, you can find a sample pipeline here. Note that I have made every effort to extract variables into variable groups to aid reuse of the pipeline definition. I have added documentation as to where variable are stored and what they are used for. ...

April 7, 2020 · 6 min · Richard Fennell

My Azure DevOps Pipeline is not triggering on a GitHub Pull request - fixed

I have recently hit a problem that some of my Azure DevOps YAML pipelines, that I use to build my Azure DevOps Pipeline Extensions, are not triggering on a new PR being created on GitHub. I did not get to the bottom of why this is happening, but I found a fix. Check and of make a note of any UI declared variables in your Azure DevOps YAML Pipeline that is not triggering Delete the pipeline Re-add the pipeline, linking to the YAML file hosted on GitHub. You might be asked to re-authorise the link between Azure DevOps Pipelines and GitHub. Re-enter any variables that are declared via the Pipelines UI and save the changes Your pipeline should start to be triggered again ...

April 7, 2020 · 1 min · Richard Fennell

Experiences setting up Azure Active Directory single sign-on (SSO) integration with GitHub Enterprise

Background GitHub is a great system for individuals and OSS communities for both public and private project. However, corporate customers commonly want more control over their system than the standard GitHub offering. It is for this reason GitHub offers GitHub Enterprise. For most corporates, the essential feature that GitHub Enterprise offers is the use Single Sign On (SSO) i.e. allowing users to login to GitHub using their corporate directory accounts. I wanted to see how easy this was to setup when you are using Azure Active Directory (AAD). ...

March 30, 2020 · 2 min · Richard Fennell