Categories

  • jira
  • octopus
  • teamcity
  • tfs

Update 2019-08-24
If you use Jira + TeamCity + Octopus stack. The official Octopus plugin for TeamCity now supports metadata generation, give it a try https://octopus.com/blog/metadata-and-work-items


Recently we switched from TFS to Jira and TeamCity. We used to generate release notes with the Octopus extension, and it has release notes generation feature out of the box. Sadly, the TeamCity plugin does not have the feature, and the Octopus team said that they are not going to implement it. Starting from Octopus 2019.4 the official TeamCity plugin supports the metadata generation.

However, the Octopus support sent the link to the excellent article which shows how you can generate the release notes with commits using PowerShell. However, the script doesn’t fit our needs, because we wanted to include linked tasks too, so I extended the script.

The extended script grabs all the changes from a TeamCity build and tries to retrieve the tasks’ information from Jira and generates a markdown file with release notes. After that, you can publish the generated file to the Octopus server with octo.exe or TeamCity plugin. I’ve also created a TeamCity meta-runner which you can use as a build step in TeamCity. The source code is available here. The script was tested on Jira 7 and TeamCity 2018.1

Hope this script will be useful for someone else.