共用方式為


AzureRmWebAppDeployment@2 - Azure App Service Deploy v2 task

Use this task to update Azure App Service using Web Deploy/Kudu REST APIs.

Inputs

ConnectedServiceName - Azure Subscription
string. Required.

Specify the Azure Resource Manager subscription for the deployment.


WebAppName - App Service name
string. Required.

Specify the name of an existing Azure App Service.


DeployToSlotFlag - Deploy to slot
boolean. Default value: false.

Use this option to deploy to an existing slot other than the Production slot.


ResourceGroupName - Resource group
string. Required when DeployToSlotFlag = true.

Specify the Azure Resource group that contains the Azure App Service specified above.


SlotName - Slot
string. Required when DeployToSlotFlag = true.

Specify an existing slot other than the Production slot.


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.


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.


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.


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.


SetParametersFile - SetParameters File
string. Optional. Use when UseWebDeploy == true.

Specify the location of the SetParameters.xml file to use.


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.


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.


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.


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.


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

None.

Requirements

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