Skip to content

Latest commit

 

History

History
268 lines (212 loc) · 9.36 KB

azure-function-app-container-v1.md

File metadata and controls

268 lines (212 loc) · 9.36 KB
title description ms.date monikerRange
AzureFunctionAppContainer@1 - Azure Functions for container v1 task
Update a function app with a Docker container.
07/02/2024
>=azure-pipelines-2019.1

AzureFunctionAppContainer@1 - Azure Functions for container v1 task

:::moniker range=">=azure-pipelines-2020"

Update a function app with a Docker container.

:::moniker-end

:::moniker range="=azure-pipelines-2019.1"

Update Function Apps with Docker containers.

:::moniker-end

Syntax

:::moniker range=">=azure-pipelines-2020"

# Azure Functions for container v1
# Update a function app with a Docker container.
- task: AzureFunctionAppContainer@1
  inputs:
    azureSubscription: # string. Required. Azure subscription. 
    appName: # string. Required. App name. 
    #deployToSlotOrASE: false # boolean. Deploy to Slot or App Service Environment. Default: false.
    #resourceGroupName: # string. Required when deployToSlotOrASE = true. Resource group. 
    #slotName: 'production' # string. Required when deployToSlotOrASE = true. Slot. Default: production.
    imageName: # string. Required. Image name. 
    #containerCommand: # string. Startup command. 
  # Application and Configuration Settings
    #appSettings: # string. App settings. 
    #configurationStrings: # string. Configuration settings.

:::moniker-end

:::moniker range="=azure-pipelines-2019.1"

# Azure Function for container v1
# Update Function Apps with Docker containers.
- task: AzureFunctionAppContainer@1
  inputs:
    azureSubscription: # string. Required. Azure subscription. 
    appName: # string. Required. App name. 
    #deployToSlotOrASE: false # boolean. Deploy to Slot or App Service Environment. Default: false.
    #resourceGroupName: # string. Required when deployToSlotOrASE = true. Resource group. 
    #slotName: 'production' # string. Required when deployToSlotOrASE = true. Slot. Default: production.
    imageName: # string. Required. Image name. 
    #containerCommand: # string. Startup command. 
  # Application and Configuration Settings
    #appSettings: # string. App settings. 
    #configurationStrings: # string. Configuration settings.

:::moniker-end

Inputs

:::moniker range=">=azure-pipelines-2019.1"

azureSubscription - Azure subscription
string. Required.

Selects the Azure Resource Manager subscription for the deployment.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

appName - App name
string. Required.

The name of the Function App for Containers.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

deployToSlotOrASE - Deploy to Slot or App Service Environment
boolean. Default value: false.

Set this input to true to deploy to an existing deployment slot or Azure App Service Environment. The task needs a Resource Group name for both targets. For the deployment slot option, the default deploys to the production slot, or you can specify any other existing slot name. If the deployment target is an Azure App Service Environment, leave the slot name as production and specify the Resource Group name.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

resourceGroupName - Resource group
string. Required when deployToSlotOrASE = true.

The name of the Resource Group that contains the Function App for Containers.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

slotName - Slot
string. Required when deployToSlotOrASE = true. Default value: production.

Enters or selects an existing slot, excluding the production slot.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

imageName - Image name
string. Required.

A globally unique top-level domain name for your specific registry or namespace.

Note: A fully qualified image name will be of the format: <registry or namespace> <repository> <tag>. For example, myregistry.azurecr.io/nginx:latest.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

containerCommand - Startup command
string.

The startup command that executes after deployment. For example, dotnet run dotnet filename.dll.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

appSettings - App settings
string.

Enter the application settings using the syntax -key value (for example: -Port 5000 -RequestTimeout 5000 -WEBSITE_TIME_ZONE). Enclose values that contain spaces in double quotes (for example: "Eastern Standard Time").


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

configurationStrings - Configuration settings
string.

Enter the configuration strings using the syntax -key value (for example: -phpVersion 5.6 -linuxFxVersion: node|6.11). Enclose values that contain spaces in double quotes.


:::moniker-end

Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

:::moniker range=">=azure-pipelines-2019.1"

This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.

AppServiceApplicationUrl
The application URL of the selected App Service.

:::moniker-end

Remarks

Use this task to deploy an Azure Function on Linux using a custom image.

[!INCLUDE rm-app-service-troubleshoot-shared]

[!INCLUDE rm-app-service-FAQs-shared]

Examples

This example deploys Azure Functions on Linux using containers:

variables:
  imageName: contoso.azurecr.io/azurefunctions-containers:$(build.buildId)
  azureSubscription: Contoso
  # To ignore SSL error uncomment the following variable
  # VSTS_ARM_REST_IGNORE_SSL_ERRORS: true

steps:
- task: AzureFunctionAppContainer@1
  displayName: Azure Function App on Container deploy
  inputs:
    azureSubscription: $(azureSubscription)
    appName: functionappcontainers
    imageName: $(imageName)

Requirements

:::moniker range=">=azure-pipelines-2019.1"

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.104.1 or greater
Task category Deploy

:::moniker-end