{"id":20647,"date":"2018-10-16T08:00:44","date_gmt":"2018-10-16T15:00:44","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=19595"},"modified":"2019-06-19T20:28:23","modified_gmt":"2019-06-20T03:28:23","slug":"automating-release-notes-with-azure-functions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/automating-release-notes-with-azure-functions\/","title":{"rendered":"Automating Release Notes with Azure Functions"},"content":{"rendered":"<p>We can all agree that tracking the progress of a project enhances productivity and is an effective way to keep everyone involved of its progress. When it comes to managing your project in Azure DevOps (formerly VSTS) or GitHub, you have all of your artifacts in one place: code, CI\/CD pipelines, releases, work items, and more. In cases where there\u2019s a larger project with a larger team, the rate at which pull requests and work items are created, opened, and closed will increase significantly between each release. Imagine a large user base that wanted to stay updated on these changes and updates through release notes. They\u2019ll want to know if that pesky bug that was introduced in the last version got fixed this time, or if that feature they\u2019re excited about finally made it out of beta.<\/p>\n<p>Release notes tend to map directly to items that a team is tracking internally; I\u2019d expect a work item on a bug high severity to make it into the release documentation. However, putting together release notes can be quite a challenge and very time-consuming. When it\u2019s time to ship new software updates, someone must manually go back in time to the last release, gather the relevant information, and compile it into a document to share with users. How do we keep the release information current and accurate for end users?<\/p>\n<p>It\u2019d be nice to automate the process of extracting information from completed work items and merged pull requests to create a document that outlines changes in a new release. This was the inspiration of the Release Notes Generator. With Azure Functions and Azure Blob Storage, the generator creates a markdown file every time a new release is created in Azure DevOps. In this post, we\u2019ll walk through how the generator works, and use a sample DevOps project as an example for the generator. If you\u2019d like a GitHub version, see the <span><a href=\"https:\/\/open.microsoft.com\/2018\/09\/06\/how-to-automate-software-release-notes\/?WT.mc_id=dotnet-blog-jasmineg\">GitHub release notes generator sister post<\/a><\/span>.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/adoworkitems.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/adoworkitems-e1539638432651.png\" alt=\"\" class=\"aligncenter wp-image-19615 size-full\" width=\"800\" height=\"379\" \/><\/a><\/p>\n<p style=\"text-align: center\"><em>Overview of an Azure DevOps Project\u2019s Work Items<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/renderedmkd.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/renderedmkd-e1539638493118.png\" alt=\"\" class=\"aligncenter wp-image-19605 size-full\" width=\"800\" height=\"377\" \/><\/a><\/p>\n<p style=\"text-align: center\"><em>View of Rendered Markdown version of release notes in VS Code with <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=yzhang.markdown-all-in-one\">Markdown All in One Extension<\/a><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>The generator is an Azure Function app; Functions allow you to only pay for the time your code is running, so I\u2019m only paying for the time it takes my code that generates notes to execute. With an HTTP triggered function, a webhook is configured in Azure DevOps to send an HTTP request to the function to kick off the notes generation process. Webhook configuration simply requires you to copy the url of the function that you\u2019d like to send the endpoint to. An added benefit of using Azure Functions is that you can get started locally on your machine using <span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-develop-vs?WT.mc_id=dotnet-blog-jasmineg\"><\/a><\/span> or the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-run-local?WT.mc_id=dotnet-blog-jasmineg\">\u00a0<\/a>. You can create, debug, test, and deploy your function app all from the comfort of your own computer without even needing an Azure Subscription. You can test HTTP triggered functions locally with a tool like <span><a href=\"https:\/\/ngrok.com\/\">ngrok<\/a><\/span>.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/localdevfunctions.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/localdevfunctions-e1539638550541.png\" alt=\"\" class=\"aligncenter wp-image-19625 size-full\" width=\"800\" height=\"518\" \/><\/a><\/p>\n<p style=\"text-align: center\"><em>Local development of HTTP triggered function in Visual Studio<\/em><\/p>\n<p>Out of all of Azure\u2019s storage account offerings, blob storage is suited for serving and storing unstructured data objects like textual files, including the markdown representation of the release notes. The blob storage structure is similar to common file systems where objects, named blobs, are organized and stored in containers. This way, the release notes have a dedicated location inside a \u201creleases\u201d container. You can manage a storage account on your computer with the Azure Storage Explorer.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><em><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/storagexplorerblob1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/10\/2019\/02\/storagexplorerblob1-1024x488.png\" alt=\"\" class=\"alignnone wp-image-19645 size-large\" width=\"879\" height=\"419\" \/><\/a><\/em><\/p>\n<p style=\"text-align: center\"><em>Release notes blobs in the releases container in Azure Storage Explorer<\/em><\/p>\n<p>The release function uses the Azure Storage API to create a file and append text and links to a file. Interacting with blobs and blob containers through the API requires minimal setup; you just need the associated storage account connection string to get started.<\/p>\n<p style=\"text-align: center\"><script src=\"https:\/\/gist.github.com\/paladique\/747851e3105da2ea9ba38ebbe85f62fd.js\"><\/script>\n<em>Creating a new release file with Azure Storage API<\/em><\/p>\n<p>Azure Functions are a quick and straightforward way to enhance your workflows with Azure DevOps webhooks. The<a href=\"https:\/\/github.com\/Azure-Samples\/azure-devops-release-notes\"> release notes generator sample code<\/a> is a good start if you\u2019re interested in exploring the serverless possibilities that work for you. The sample includes instructions on how to run it in Visual Studio. Once you\u2019ve got your own generator up and running, be sure to visit the docs and samples to see what else you can do.<\/p>\n<h2>Resources<\/h2>\n<p><a href=\"https:\/\/github.com\/Azure-Samples\/azure-devops-release-notes\">Sample Code on GitHub<\/a><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops-project\/overview?WT.mc_id=dotnet-blog-jasmineg\">Overview of Azure DevOps Project<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-overview?WT.mc_id=dotnet-blog-jasmineg\">Azure Functions Documentation<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-develop-vs?WT.mc_id=dotnet-blog-jasmineg\">Develop Azure Functions using Visual Studio<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-develop-local?WT.mc_id=dotnet-blog-jasmineg\">Code and test Azure Functions Locally<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/service-hooks\/services\/webhooks?WT.mc_id=dotnet-blog-jasmineg\">WebHooks with Azure DevOps Services<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/blobs\/storage-quickstart-blobs-dotnet?WT.mc_id=dotnet-blog-jasmineg\">Quickstart: Use .NET to create a blob in object storage<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/vs-azure-tools-storage-manage-with-storage-explorer?WT.mc_id=dotnet-blog-jasmineg\">Get started with Storage Explorer<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/docs.microsoft.com\/en-us\/learn\/paths\/create-serverless-applications\/index?WT.mc_id=dotnet-blog-jasmineg\">Microsoft Learn Learning Path: Create Serverless Applications<\/a><\/span><\/p>\n<p><span><a href=\"https:\/\/open.microsoft.com\/2018\/09\/06\/how-to-automate-software-release-notes\/?WT.mc_id=dotnet-blog-jasmineg\">GitHub Version sister post<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can all agree that tracking the progress of a project enhances productivity and is an effective way to keep everyone involved of its progress. When it comes to managing your project in Azure DevOps (formerly VSTS) or GitHub, you have all of your artifacts in one place: code, CI\/CD pipelines, releases, work items, and [&hellip;]<\/p>\n","protected":false},"author":5335,"featured_media":21645,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[327],"tags":[37],"class_list":["post-20647","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure"],"acf":[],"blog_post_summary":"<p>We can all agree that tracking the progress of a project enhances productivity and is an effective way to keep everyone involved of its progress. When it comes to managing your project in Azure DevOps (formerly VSTS) or GitHub, you have all of your artifacts in one place: code, CI\/CD pipelines, releases, work items, and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/5335"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=20647"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20647\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/21645"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=20647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=20647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=20647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}