14 Yaml Samples
Oliver Dolk редактировал(а) эту страницу 2019-01-29 16:23:00 -08:00

If you are interested in just dragging and dropping an azure pipelines file into your project and running a build based off it then follow these instructions. If you are interested in setting up your build through an interactive experience we are looking to release a new command in the next az CLI release called az functionapp devops-build.

There are several scenarios for deploying your Azure Functions application. The required setups and yaml files needed to deploy each of the scenarios different scenarios will be explained individually below.

For all of the scenarios you need to follow these common steps:

  1. You need to create a service connection between Azure DevOps project and your Azure account. Instructions here.
  2. You need to edit the yaml file so that the variables are defined. There are individual steps for the linux consumption, linux dedicated and windows below.
  3. Rename the yaml file to be azure-pipelines.yml
  4. Add the yaml file to your build in Azure DevOps

Linux consumption

The linux consumption examples are here. You need to replace the following variables:

  • azureSubscription: this is the name of the service connection that you defined in step 1
  • storageName: the storage name that is connected to your function application on azure
  • functionappName: the name of your function application on azure
  • resourceGroupName: the name of the resource group that contains your function application

There is also an extra step for linux consumption. This involves installing two external third party extensions. The first is setting app settings and the second is creating a sas token. These extensions need to be installed to your azure devops organization before you run the build.

Linux dedicated

The linux dedicated examples are here. You need to replace the following variables:

  • azureSubscription: this is the name of the service connection that you defined in step 1
  • functionappName: the name of your function application on azure

Windows

The windows examples are here. You need to replace the following variables:

  • azureSubscription: this is the name of the service connection that you defined in step 1
  • functionappName: the name of your function application on azure