title | description | services | keywords | author | ms.author | ms.date | ms.topic | ms.service | ms.custom |
---|---|---|---|---|---|---|---|---|---|
Create a function in Azure that is deployed from Azure DevOps | Microsoft Docs |
Create a Function App and deploy function code from Azure DevOps |
functions |
ggailey777 |
glenga |
07/03/2018 |
sample |
azure-functions |
mvc |
This topic shows you how to use Azure Functions to create a serverless function app using the consumption plan. The function app, which is a container for your functions, is continuously deployed from a Azure DevOps repository.
[!INCLUDE upgrade runtime]
To complete this topic, you must have:
- An Azure DevOps repository that contains your function app project and to which you have administrative permissions.
- A personal access token (PAT) to access your Azure DevOps repository.
[!INCLUDE quickstarts-free-trial-note]
[!INCLUDE cloud-shell-try-it.md]
If you rather use the Azure CLI locally, you must install and use version 2.0 or a later version. To determine the Azure CLI version, run az --version
. If you need to install or upgrade, see Install the Azure CLI.
This sample creates an Azure Function app and deploys function code from Azure DevOps.
[!code-azurecli-interactivemain]
[!INCLUDE cli-script-clean-up]
This script uses the following commands to create a resource group, storage account, function app, and all related resources. Each command in the table links to command specific documentation.
Command | Notes |
---|---|
az group create | Creates a resource group in which all resources are stored. |
az storage account create | Creates the storage account required by the function app. |
az functionapp create | Creates a function app in the serverless consumption plan. |
az functionapp deployment source config | Associates a function app with a Git or Mercurial repository. |
For more information on the Azure CLI, see Azure CLI documentation.
Additional Azure Functions CLI script samples can be found in the Azure Functions documentation.