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.
resourceGroupName - Resource group string. Required when deployToSlotOrASE = true.
The name of the Resource Group that contains the Function App for Containers.
Enters or selects an existing slot, excluding the production slot.
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.
containerCommand - Startup command string.
The startup command that executes after deployment. For example, dotnet rundotnet filename.dll.
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").
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.
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.
Remarks
Use this task to deploy an Azure Function on Linux using a custom image.
Error: Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.
The task uses the service principal in the service connection to authenticate with Azure. If the service principal has expired or doesn't have permissions to the App Service, the task fails with this error. Verify the validity of the service principal used and that it's present in the app registration. For more information, see
Use role-based access control to manage access to your Azure subscription resources.
This blog post
also contains more information about using service principal authentication.
SSL error
If you want to use a certificate in App Service, the certificate must be signed by a trusted certificate authority. If your web app gives you certificate validation errors, you're probably using a self-signed certificate. Set a variable named VSTS_ARM_REST_IGNORE_SSL_ERRORS to the value true in the build or release pipeline to resolve the error.
A release hangs for long time and then fails
This problem could be the result of insufficient capacity in your App Service plan. To resolve this problem, you can scale up the App Service instance to increase available CPU, RAM, and disk space or try with a different App Service plan.
Azure Functions may suddenly stop working if more than one year has passed since the last deployment. If you deploy with "RunFromPackage" in "deploymentMethod", a SAS with an expiration date of 1 year is generated and set as the value of "WEBSITE_RUN_FROM_PACKAGE" in the application configuration. Azure Functions uses this SAS to reference the package file for function execution, so if the SAS has expired, the function will not be executed. To resolve this issue, deploy again to generate a SAS with an expiration date of one year.
How should I configure web job deployment with Application Insights?
When you're deploying to an App Service, if you have Application Insights configured and you've enabled Remove additional files at destination, you also need to enable Exclude files from the App_Data folder. Enabling this option keeps the Application Insights extension in a safe state. This step is required because the Application Insights continuous WebJob is installed into the App_Data folder.
How should I configure my agent if it's behind a proxy while I'm deploying to App Service?
If your self-hosted agent requires a web proxy, you can inform the agent about the proxy during configuration. Doing so allows your agent to connect to Azure Pipelines or Azure DevOps Server through the proxy. Learn more about running a self-hosted agent behind a web proxy.
Examples
This example deploys Azure Functions on Linux using containers:
YAML
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: truesteps:- task:AzureFunctionAppContainer@1 displayName:AzureFunctionApponContainerdeploy inputs: azureSubscription:$(azureSubscription) appName:functionappcontainers imageName:$(imageName)
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.