Use Same Version For Build and Release Pipelines in Azure DevOps

In build pipeline set the desired build number format. The default is: 0.1.$(Rev:r) and will produce versions with patch increasing for every build

  • 0.1.1
  • 0.1.2
  • 0.1.3

In the release pipeline using one or more artefacts from the build pipeline the primary artefact will be used to populate the Build.X variables.

Set the ‘Release name format’ to: PRODUCTID $(Build.Buildnumber) (release $(Rev:r)). This will produce the following release numbers>

  • PRODUCTID 0.1.1 (release 1)
  • PRODUCTID 0.1.1 (release 2)
  • PRODUCTID 0.1.2 (release 1)

The release revision will increase every time the same build is deployed multiple times (usually during debugging of the release pipeline). New version of the build will reset the release counter back to 1.

This setup allows developers to easily see how builds and releases are related. For even more transparency the build version could be stamped into the assemblies being built.

 

Migrate away from Azure Function Consumption Plan

Follow these steps to migrate away from the Azure Function’s consumption plan to a regular App Service Plan.

  1. Create a new App Service Plan in GUI or via Powershell
  2. Select your subscription: Select-AzureRmSubscription “SubscriptionName”
  3. Move azure function to new plan: Set-AzureRmWebApp -Name “functionAppName” -ResourceGroupName “rgName” -AppServicePlan “newAppServicePlanName”

Credit goes to DeV1l: https://github.com/Azure/Azure-F5unctions/issues/15