languages | products | page_type | description | |||||
---|---|---|---|---|---|---|---|---|
|
|
sample |
A release notes generator for Azure DevOps. |
A release notes generator for Azure DevOps.
Rendered markdown file of example release notes
The generator is a function app containing a HTTP triggered function that creates a Markdown file whenever a new release is created in Azure DevOps, using Azure Blob Storage.
- Azure account.
- Azure DevOps Project
- Azure Storage Explorer
- Visual Studio
- Azure Functions and WebJob Tools for Visual Studio
The following tutorial shows how to run locally and deploy the function app via Visual Studio.
- Clone this repo and open the project in Visual Studio.
- Rename dev.settings.json to local.settings.json and update the settings. Refer to the application settings table for details. You can ignore
AzureWebJobsStorage
,AzureWebJobsStorage
. LeaveStorageAccountConnectionString
as is to work with the local storage account in Storage Explorer. - In the Storage Explorer, open Local And Attached > Storage Accounts > Right click on Blob Containers > Create Blob Container. Enter the name
releases
- In your command line interface of choice, execute ngrok command
ngrok http 7071
. Leave open for the remainder of local development. - Follow the instructions to create a webhook in Azure DevOps and paste the generated ngrok url so that it reads
http://___.ngrok.io/api/ReleaseNotesWebHook
- Run the app with F5
- You can test the function without making a new release by editing the webhook, clicking Next to go to the Action dialog, then Test.
- Check your
releases
container to find generated release notes.
You'll need a tool that exposes your local function to Azure DevOps. This quickstart uses ngrok.
- Clone this repo and open the project in Visual Studio.
- In Solution Explorer, right-click the project, then click Publish.
- On the right of the publish dialog, select Azure Function App, choose Create New, and then click Create Profile.
- Connect your Azure account to Visual Studio if you haven't already. When connected, fill out the application hosting settings. Refer to the table for host settings:
Setting | Suggested value | Description |
---|---|---|
App Name | Default value | Name that uniquely identifies your new function app. |
Subscription | Choose your subscription | The Azure subscription to use. |
Resource Group | releasenotesgroup | Choose New to create a new resource group. |
App Service Plan | Consumption plan | Make sure to choose the Consumption under Size after you click New. Also, choose a Location in a region near you or near other services your functions access. |
Storage Account | Default value | An Azure storage account is required by the Functions runtime. Click New to create a general purpose storage account. You can also use an existing account. |
- Click Create Storage Account and follow the account dialog to set your storage account name. Make sure the Account Type is Standard. Click Ok.
- In the publish dialog click Create
- When deployment is completed, you'll be directed to a view of of your new function app's details. Click on Manage Application Settings.
- Refer to the table below to configure your application settings:
Setting | Location | Description |
---|---|---|
StorageAccountConnectionString | Highlight created storage account in Azure Storage Explorer, locate its properties at the bottom left, labeled Primary Connection String | Keys and other information required to establish a connection to a storage account |
DevOps.OrganizationURL | Browser address bar | Url of your Azure DevOps Organization: https://dev.azure.com/orgname/ |
DevOps.AccessToken | In Azure DevOps: On the top right of project, click on your profile then Security > Access Tokens > + New Token. Set Read permissions on Code and Work Items. For more detailed instructions, visit Create personal access tokens to authenticate access. | Required authorization token to access project information. |
DevOps.ProjectName | Azure DevOps Project | Name of the project to generate release notes from. |
DevOps.Username | Azure DevOps profile, usually an email address. | DevOps.Username for Azure DevOps. |
- Click Ok then copy the Site URL. Save for later.
- In Azure Storage Explorer, expand the newly created storage account.
- Right click on Blob Containers > Create Blob Container and enter the name
releases
- In your Azure DevOps project, select the project you'd like to generate notes from. On the bottom left hand side, open Project Settings.
- To the left of the settings, select Service hooks. Click the green button to add a new webhook.
- In the dialog, select Web Hooks, click Next.
- In the next dialog, select Release created from the dropdown, click Next.
- Paste, then update the copied url by so that it reads
https://functionappname.azurewebsites.net/api/ReleaseNotesWebHook
. - Click Finish to save your changes.
Create a new release in Azure DevOps to generate notes. You can also test the function without making a new release by editing the webhook, clicking Next to go to the Action dialog, then Test. Check your releases
container to find generated release notes.