Automated Release Notes for your (D365) Azure DevOps – project

MarijanFinance & Operations3 years ago17 Views

Ever since I used Azure DevOps (or visualstudio.com or VS online) as a version control system and to build and release Dynamics AX code to different environments, I wanted a neat and simple way to auto generate release notes.
So this time I want to show you, how we can use Azure DevOps to auto create Release Notes and even get them published into your DevOps wiki.
After some digging around on this topic, I came across the Generate Release Notes and the WIKI Updater Tasks extension from @richardfenell.

In our simplified scenario, we want to generate release notes whenever a deployable package is uploaded to the LCS.
To achieve this, we need to check in our changes against a backlog item in DevOps. In my case I like to keep it clean and I’m checking my development work against a development task.
When merging changes into the next branch I link it against the parent – requirement. That might be a little bit more work to do, but the result with the release notes justifies this for me. So I keep my projects organized this way and the other project developers are following these guidelines.

The following prerequisites we have:

  • Code hosted in a TFVC repository, but the extension also works for Git repositories
  • Git based project wiki

But first, we need to install the Generate Release Notes and the WIKI Updater Tasks extensions to our DevOps organization. They will generate a markdown file and upload the file into the project wiki.
Keep in mind, that you need to be a project collection owner or the organization admin to be able to install the extensions.

After the installation we can go straight to our release pipeline and add the new “Generate Release Notes (Crossplatform)” task to our pipeline.

In the output file parameter we specify where the markdown file should be generated.
Next step is to choose between an inline or a file based template. To keep it simple, we’ll choose the inline template location and insert the following sample code:

|<div>**D365 ReleaseNotes** </div>  | 
|--|
|<div>🚀**Release:** {{releaseDetails.name}}</div> 
<div>📅**Release completed:** {{releaseDetails.modifiedOn}} |
[[_TOC_]]
## 📘 Requirements in this release: ({{workItems.length}})

{{#forEach workItems}}
**{{this.id}}** [{{lookup this.fields 'System.Title'}}](https://dev.azure.com/MariDevOps/MyFirstProject/_workitems/edit/{{this.Id}})<br>
{{/forEach}}

## 💡 Requirement details

{{#forEach workItems}}
- ###**{{this.id}}** {{lookup this.fields 'System.Title'}}<br>
  {{{lookup this.fields 'System.Description'}}}<br>
  Current State: #{{this.id}}<br>   
  <br>Responsible:<br>
  Consultant: {{get 'displayName' (get 'System.AssignedTo' this.fields)}}<br> 
{{/forEach}} 

The script will then gather the following information:

  • Release name
  • Release end date & time
  • List all of the requirements from the release
  • Details for the requirements like current state, description an assigned user

So now the next release will create a markdown file.
But how can we access the markdown file? In my case I wanted it to be uploaded directly to the Azure DevOps project wiki. In that way everyone involved in the project sees what’s inside the latest release.
To upload the markdown file, we add the “Git based WIKI Folder Updater” task to our pipeline:

In this task we need to specify the following options:

  • Path of the Git repository
  • Checkout branch (can be left empty)
  • Name of the repository folder where the file will be uploaded. This is useful if you want to upload into different folders for different releases. Like test, preprod etc.
  • Specify the source folder and file filter
  • Enter a commit message and the Git name as well as the email address

In the authentication area we can go with a DevOps PAT, which needs to be created.
With everything setup, we can trigger or wait for the next release.

So all this work, for what?

For an insightful, nice looking wiki page, with all the information regarding the release.

I hope this post gives you some inspiration on creating release notes using Azure DevOps. To get more information on the extension, head over to the Github repository. There is also a tool provided for local testing, so that you don’t have to create a build / release every time you want to test your script.

Original Post https://d365fostuff.wordpress.com/2021/12/01/automated-release-notes-for-your-d365-azure-devops-project/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...