Code Monkey home page Code Monkey logo

azure-devops-release-notes's Introduction

languages products page_type description
csharp
azure
azure-functions
azure-devops
azure-storage
sample
A release notes generator for Azure DevOps.

Azure DevOps Release Notes Generator

A release notes generator for Azure DevOps.

Features

Rendered markdown file of example release notes 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.

Prerequisites

Visual Studio Quickstart

The following tutorial shows how to run locally and deploy the function app via Visual Studio.

Running Locally in Visual Studio

  1. Clone this repo and open the project in Visual Studio.
  2. 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. Leave StorageAccountConnectionString as is to work with the local storage account in Storage Explorer.
  3. In the Storage Explorer, open Local And Attached > Storage Accounts > Right click on Blob Containers > Create Blob Container. Enter the name releases
  4. In your command line interface of choice, execute ngrok command ngrok http 7071. Leave open for the remainder of local development.
  5. 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
  6. Run the app with F5
  7. You can test the function without making a new release by editing the webhook, clicking Next to go to the Action dialog, then Test.
  8. Check your releases container to find generated release notes.

Deploy to Azure from Visual Studio

You'll need a tool that exposes your local function to Azure DevOps. This quickstart uses ngrok.

  1. Clone this repo and open the project in Visual Studio.
  2. In Solution Explorer, right-click the project, then click Publish.
  3. On the right of the publish dialog, select Azure Function App, choose Create New, and then click Create Profile.
  4. 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.

Publishing a Function app from Visual Studio Publishing from Visual Studio

  1. Click Create Storage Account and follow the account dialog to set your storage account name. Make sure the Account Type is Standard. Click Ok.
  2. In the publish dialog click Create

Configure Function App Settings

Successful function app deployment view

  1. When deployment is completed, you'll be directed to a view of of your new function app's details. Click on Manage Application Settings.
  2. Refer to the table below to configure your application settings:

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.
  1. Click Ok then copy the Site URL. Save for later.

Create a Blob Container

  1. In Azure Storage Explorer, expand the newly created storage account.
  2. Right click on Blob Containers > Create Blob Container and enter the name releases

Adding a blob container in Azure Storage Explorer

Configure Azure DevOps Webhook

  1. In your Azure DevOps project, select the project you'd like to generate notes from. On the bottom left hand side, open Project Settings.
  2. To the left of the settings, select Service hooks. Click the green button to add a new webhook.
  3. In the dialog, select Web Hooks, click Next.
  4. In the next dialog, select Release created from the dropdown, click Next.

Adding a webhook in Azure DevOps

  1. Paste, then update the copied url by so that it reads https://functionappname.azurewebsites.net/api/ReleaseNotesWebHook.
  2. Click Finish to save your changes.

Test the application

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.

Resources

azure-devops-release-notes's People

Contributors

microsoftopensource avatar msftgits avatar paladique avatar supernova-eng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-devops-release-notes's Issues

Username cannot be added to Application Settings in the portal.

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Deploy to Azure.
Try to edit Application Settings to add Username

Any log messages given by the failure

Failed to update web app settings: ["{"Code":"BadRequest","Message":"The data is not valid (Invalid or not allowed environment key name: Username).","Target":null,"Details":[{"Message":"The data is not valid (Invalid or not allowed environment key name: Username)."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01019","MessageTemplate":"The data is not valid ({0}).","Parameters":["Invalid or not allowed environment key name: Username"],"Code":"BadRequest","Message":"The data is not valid (Invalid or not allowed environment key name: Username)."}}],"Innererror":null}"]

Expected/desired behavior

Username is saved

Mention any other details that might be useful

Changing the Variable name to DevOps.Username should fix it.

UserDomain can't be added to app settings via Arm or ADO

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

deploy to azure using arm template with userdomain defined as a parameter

Any log messages given by the failure

The data is not valid (Invalid or not allowed environment key name: UserDomain

Expected/desired behavior

add userdomain as an app setting to web app

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful

I tried deploying using custom template and azure devops, both failed with the same error. removing the param and app setting from the template deploys the app successfully.


Thanks! We'll be in touch soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.