title | description | ms.date | monikerRange |
---|---|---|---|
AzureRmWebAppDeployment@2 - Azure App Service Deploy v2 task |
Update Azure App Service using Web Deploy / Kudu REST APIs (task version 2). |
05/14/2024 |
<=azure-pipelines |
:::moniker range="<=azure-pipelines"
Use this task to update Azure App Service using Web Deploy/Kudu REST APIs.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
# Azure App Service deploy v2
# Update Azure App Service using Web Deploy / Kudu REST APIs.
- task: AzureRmWebAppDeployment@2
inputs:
ConnectedServiceName: # string. Required. Azure Subscription.
WebAppName: # string. Required. App Service name.
#DeployToSlotFlag: false # boolean. Deploy to slot. Default: false.
#ResourceGroupName: # string. Required when DeployToSlotFlag = true. Resource group.
#SlotName: # string. Required when DeployToSlotFlag = true. Slot.
#VirtualApplication: # string. Virtual Application.
Package: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Required. Package or Folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
# Output
#WebAppUri: # string. App Service URL.
# Additional Deployment Options
#UseWebDeploy: true # boolean. Publish using Web Deploy. Default: true.
#SetParametersFile: # string. Optional. Use when UseWebDeploy == true. SetParameters File.
#RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true. Remove Additional Files at Destination. Default: false.
#ExcludeFilesFromAppDataFlag: false # boolean. Optional. Use when UseWebDeploy == true. Exclude Files from the App_Data Folder. Default: false.
#AdditionalArguments: # string. Optional. Use when UseWebDeploy == true. Additional Arguments.
#TakeAppOfflineFlag: false # boolean. Take App Offline. Default: false.
:::moniker-end
:::moniker range="<=azure-pipelines"
ConnectedServiceName
- Azure Subscription
string
. Required.
Specify the Azure Resource Manager subscription for the deployment.
:::moniker-end
:::moniker range="<=azure-pipelines"
WebAppName
- App Service name
string
. Required.
Specify the name of an existing Azure App Service.
:::moniker-end
:::moniker range="<=azure-pipelines"
DeployToSlotFlag
- Deploy to slot
boolean
. Default value: false
.
Use this option to deploy to an existing slot other than the Production slot.
:::moniker-end
:::moniker range="<=azure-pipelines"
ResourceGroupName
- Resource group
string
. Required when DeployToSlotFlag = true
.
Specify the Azure Resource group that contains the Azure App Service specified above.
:::moniker-end
:::moniker range="<=azure-pipelines"
SlotName
- Slot
string
. Required when DeployToSlotFlag = true
.
Specify an existing slot other than the Production slot.
:::moniker-end
:::moniker range="<=azure-pipelines"
VirtualApplication
- Virtual Application
string
.
Specify the name of the Virtual Application that has been configured in the Azure portal. The option is not required for deployments to the App Service root.
:::moniker-end
:::moniker range="<=azure-pipelines"
Package
- Package or Folder
string
. Required. Default value: $(System.DefaultWorkingDirectory)/**/*.zip
.
The folder or file path to the App Service package or folder. Variables include Build and Release. Wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\*\*/\*.zip
.
:::moniker-end
:::moniker range="<=azure-pipelines"
WebAppUri
- App Service URL
string
.
Specify a name for the output variable that is generated for the URL of the App Service. The variable can be used in subsequent tasks.
:::moniker-end
:::moniker range="<=azure-pipelines"
UseWebDeploy
- Publish using Web Deploy
boolean
. Default value: true
.
Publish using web deploy
options are supported only when using a Windows agent. On other platforms, the task relies on Kudu REST APIs to deploy the App Service, and the following options are not supported.
:::moniker-end
:::moniker range="<=azure-pipelines"
SetParametersFile
- SetParameters File
string
. Optional. Use when UseWebDeploy == true
.
Specify the location of the SetParameters.xml
file to use.
:::moniker-end
:::moniker range="<=azure-pipelines"
RemoveAdditionalFilesFlag
- Remove Additional Files at Destination
boolean
. Optional. Use when UseWebDeploy == true
. Default value: false
.
Use this option to delete files on the Azure App Service that have no matching files in the App Service package or folder.
:::moniker-end
:::moniker range="<=azure-pipelines"
ExcludeFilesFromAppDataFlag
- Exclude Files from the App_Data Folder
boolean
. Optional. Use when UseWebDeploy == true
. Default value: false
.
Exclude files in the App_Data
folder from being deployed to the Azure App Service.
:::moniker-end
:::moniker range="<=azure-pipelines"
AdditionalArguments
- Additional Arguments
string
. Optional. Use when UseWebDeploy == true
.
Additional Web Deploy arguments following the syntax -key:value
.
These will be applied when deploying the Azure App Service. Example: -disableLink:AppPoolExtension
-disableLink:ContentExtension
.
Learn more about Web Deploy operation settings.
:::moniker-end
:::moniker range="<=azure-pipelines"
TakeAppOfflineFlag
- Take App Offline
boolean
. Default value: false
.
Use this option to take the Azure App Service offline by placing an app_offline.htm
file in the root directory of the App Service before the sync operation begins. The file will be removed after the sync operation completes successfully.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range="<=azure-pipelines"
None.
:::moniker-end
:::moniker range="<=azure-pipelines"
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | 1.102.0 or greater |
Task category | Deploy |
:::moniker-end