Azure Web App task
Use this task to deploy web applications to Azure App service.
|(Required) Name of the Azure Resource Manager service connection|
|(Optional) Web App type|
|(Required) Name of an existing App Service|
Deploy to Slot or App Service Environment
|(Optional) Select the option to deploy to an existing deployment slot or Azure App Service Environment. For both the targets, the task needs resource group name. In case the deployment target is a slot, by default the deployment is done to the production slot. Any other existing slot name can also be provided. In case the deployment target is an Azure App Service environment, specify the resource group name.
Default value: false
|(Required if deployToSlotOrASE is true) Name of the resource group|
|(Required if deployToSlotOrASE == true) Name of the slot
Default value: production
Package or folder
|(Required) File path to the package or a folder containing app service contents generated by MSBuild war file or jar file. Variables ( Build | Release), wildcards are supported. For example, $(System.DefaultWorkingDirectory)//.zip or $(System.DefaultWorkingDirectory)//.war|
|(Optional) Web App on Linux offers two different options to publish your application, one is custom image deployment (Web App for Containers) and the other is app deployment with a built-in platform image (Web App on Linux). You will see this parameter only when you select Linux Web App in the app type selection option in the task. [Here](supports a number of Built-in images) is the list of Built-in images support|
|(Optional; Relevant if appType == webAppLinux) Startup command to be run post deployment|
Generate web.config parameters for Python, Node.js, Go and Java apps
|(Optional) A standard web.config will be generated and deployed to Azure App Service if the application does not have one. The values in web.config can be edited and vary based on the application framework. For example for node.js application, web.config will have startup file and iis_node module values. This edit feature is only for the generated web.config. Learn more|
|(Optional) Application settings to be entered using the syntax '-key value'. Values containing spaces should be enclosed in double quotes.
Example: -Port 5000 -RequestTimeout 5000 -WEBSITE_TIME_ZONE "Eastern Standard Time"
|(Optional) Configuration strings to be entered using the syntax '-key value'. Values containing spaces should be enclosed in double quotes.
Example: -phpVersion 5.6 -linuxFxVersion: node|6.11
|(Required) Deployment method for the app. Acceptable values: auto/zipDeploy/runFromPackage
Default value: auto
Following is an example YAML snippet to deploy web application to the Azure Web App service running on windows.
variables: azureSubscription: Contoso # To ignore SSL error uncomment the below variable # VSTS_ARM_REST_IGNORE_SSL_ERRORS: true steps: - task: AzureWebApp@1 displayName: Azure Web App Deploy inputs: azureSubscription: $(azureSubscription) appName: samplewebapp package: $(System.DefaultWorkingDirectory)/**/*.zip
To deploy Web App for linux, set the appType parameter to
To specify the deployment method as Zip Deploy, add the parameter
deploymentMethod: zipDeploy. Other supported value for this parameter is
If not mentioned,
auto is taken as the default value.
Several deployment methods are available in this task.
Auto is the default option.
To change the deployment option in designer task, expand Additional Deployment Options and enable Select deployment method to choose from additional package-based deployment options.
Based on the type of Azure App Service and Azure Pipelines agent, the task chooses a suitable deployment technology. The different deployment technologies used by the task are:
- Kudu REST APIs
- Zip Deploy
By default the task tries to select the appropriate deployment technology given the input package, app service type and agent OS.
- When the App Service type is Web App on Linux App, use Zip Deploy
- If War file is provided, use War Deploy
- If Jar file is provided, use Run From package
- For all others, use Run From Zip (via Zip Deploy)
On non-Windows agent (for any App service type), the task relies on Kudu REST APIs to deploy the Web App.
Works on Windows as well as Linux automation agent when the target is Web App on Windows or Web App on Linux (built-in source) or Function App. The task uses Kudu to copy files to the Azure App service.
Creates a .zip deployment package of the chosen Package or folder and deploys the file contents to the wwwroot folder of the App Service name function app in Azure. This option overwrites all existing contents in the wwwroot folder. For more information, see Zip deployment for Azure Functions.
Creates the same deployment package as Zip Deploy. However, instead of deploying files to the wwwroot folder, the entire package is mounted by the Functions runtime. With this option, files in the wwwroot folder become read-only. For more information, see Run your Azure Functions from a package file.
This task is open source on GitHub. Feedback and contributions are welcome.