title | description | ms.date | monikerRange |
---|---|---|---|
AzureRmWebAppDeployment@3 - Azure App Service deploy v3 task |
Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby (task version 3). |
05/14/2024 |
<=azure-pipelines |
:::moniker range=">=azure-pipelines-2019.1"
Use this task to deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby.
Note
Use AzureFunctionApp@1 to deploy Azure Functions apps.
:::moniker-end
:::moniker range="=azure-pipelines-2019"
Update Azure App Services on Windows, Web App on Linux with built-in images or docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps, Mobile Apps, API applications, and Web Jobs using Web Deploy/Kudu REST APIs.
:::moniker-end
:::moniker range=">=azure-pipelines-2019.1"
# Azure App Service deploy v3
# Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby.
- task: AzureRmWebAppDeployment@3
inputs:
azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription.
appType: 'app' # 'app' | 'applinux' | 'functionapp' | 'api' | 'mobileapp'. Alias: WebAppKind. Required. App type. Default: app.
WebAppName: # string. Required. App Service name.
#DeployToSlotFlag: false # boolean. Optional. Use when WebAppKind != "". Deploy to slot. Default: false.
#ResourceGroupName: # string. Required when DeployToSlotFlag = true. Resource group.
#SlotName: # string. Required when DeployToSlotFlag = true. Slot.
#ImageSource: 'Registry' # 'Registry' | 'Builtin'. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Image Source. Default: Registry.
#AzureContainerRegistry: # string. Required when ImageSource = AzureContainerRegistry. Registry.
#AzureContainerRegistryLoginServer: # string. Optional. Use when ImageSource = invalidimagesource. Registry Login Server Name.
#AzureContainerRegistryImage: # string. Required when ImageSource = AzureContainerRegistry. Image.
#AzureContainerRegistryTag: # string. Optional. Use when ImageSource = AzureContainerRegistry. Tag.
#DockerRepositoryAccess: 'public' # 'private' | 'public'. Required when ImageSource = invalidImage. Repository Access. Default: public.
#dockerRegistryConnection: # string. Alias: RegistryConnectedServiceName. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry. Registry Connection.
#PrivateRegistryImage: # string. Required when ImageSource = PrivateRegistry. Image.
#PrivateRegistryTag: # string. Optional. Use when ImageSource = PrivateRegistry. Tag.
#DockerNamespace: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Registry or Namespace.
#DockerRepository: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Image.
#DockerImageTag: # string. Optional. Use when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Tag.
#VirtualApplication: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Virtual application.
#Package: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Required when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
#packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: BuiltinLinuxPackage. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
#RuntimeStack: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Runtime Stack.
#StartupCommand: # string. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Startup command.
# Output
#WebAppUri: # string. Optional. Use when WebAppKind != "". App Service URL.
# Post Deployment Action
#ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when WebAppKind != "". Deployment script type.
#InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && WebAppKind != "". Inline Script. Default: :: You can provide your deployment commands here. One command per line..
#ScriptPath: # string. Required when ScriptType == File Path && WebAppKind != "". Deployment script path.
# File Transforms & Variable Substitution Options
#GenerateWebConfig: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Generate Web.config. Default: false.
#WebConfigParameters: # string. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Web.config parameters.
#enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML transformation. Default: false.
#enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML variable substitution. Default: false.
#JSONFiles: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. JSON variable substitution.
# Application and Configuration Settings
#AppSettings: # string. App settings.
#ConfigurationSettings: # string. Configuration settings.
# Additional Deployment Options
#TakeAppOfflineFlag: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Take App Offline. Default: false.
#UseWebDeploy: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Publish using Web Deploy. Default: false.
#SetParametersFile: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". SetParameters file.
#RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Remove additional files at destination. Default: false.
#ExcludeFilesFromAppDataFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Exclude files from the App_Data folder. Default: false.
#AdditionalArguments: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Additional arguments.
#RenameFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Rename locked files. Default: false.
:::moniker-end
:::moniker range="=azure-pipelines-2019"
# Azure App Service Deploy v3
# Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs.
- task: AzureRmWebAppDeployment@3
inputs:
azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription.
appType: 'app' # 'app' | 'applinux' | 'functionapp' | 'api' | 'mobileapp'. Alias: WebAppKind. Required. App type. Default: app.
WebAppName: # string. Required. App Service name.
#DeployToSlotFlag: false # boolean. Optional. Use when WebAppKind != "". Deploy to slot. Default: false.
#ResourceGroupName: # string. Required when DeployToSlotFlag = true. Resource group.
#SlotName: # string. Required when DeployToSlotFlag = true. Slot.
#ImageSource: 'Registry' # 'Registry' | 'Builtin'. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Image Source. Default: Registry.
#AzureContainerRegistry: # string. Required when ImageSource = AzureContainerRegistry. Registry.
#AzureContainerRegistryLoginServer: # string. Optional. Use when ImageSource = invalidimagesource. Registry Login Server Name.
#AzureContainerRegistryImage: # string. Required when ImageSource = AzureContainerRegistry. Image.
#AzureContainerRegistryTag: # string. Optional. Use when ImageSource = AzureContainerRegistry. Tag.
#DockerRepositoryAccess: 'public' # 'private' | 'public'. Required when ImageSource = invalidImage. Repository Access. Default: public.
#dockerRegistryConnection: # string. Alias: RegistryConnectedServiceName. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry. Registry Connection.
#PrivateRegistryImage: # string. Required when ImageSource = PrivateRegistry. Image.
#PrivateRegistryTag: # string. Optional. Use when ImageSource = PrivateRegistry. Tag.
#DockerNamespace: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Registry or Namespace.
#DockerRepository: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Image.
#DockerImageTag: # string. Optional. Use when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry. Tag.
#VirtualApplication: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Virtual application.
#Package: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Required when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
#packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: BuiltinLinuxPackage. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
#RuntimeStack: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Runtime Stack.
#StartupCommand: # string. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Startup command.
# Output
#WebAppUri: # string. Optional. Use when WebAppKind != "". App Service URL.
# Post Deployment Action
#ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when WebAppKind != "". Deployment script type.
#InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && WebAppKind != "". Inline Script. Default: :: You can provide your deployment commands here. One command per line..
#ScriptPath: # string. Required when ScriptType == File Path && WebAppKind != "". Deployment script path.
# File Transforms & Variable Substitution Options
#GenerateWebConfig: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Generate Web.config. Default: false.
#WebConfigParameters: # string. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Web.config parameters.
#enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML transformation. Default: false.
#enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML variable substitution. Default: false.
#JSONFiles: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. JSON variable substitution.
# Application and Configuration Settings
#AppSettings: # string. App settings.
#ConfigurationSettings: # string. Configuration settings.
# Additional Deployment Options
#TakeAppOfflineFlag: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Take App Offline. Default: false.
#UseWebDeploy: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Publish using Web Deploy. Default: false.
#SetParametersFile: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". SetParameters file.
#RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Remove additional files at destination. Default: false.
#ExcludeFilesFromAppDataFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Exclude files from the App_Data folder. Default: false.
#AdditionalArguments: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Additional arguments.
#RenameFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Rename locked files. Default: false.
:::moniker-end
:::moniker range="<=azure-pipelines"
azureSubscription
- Azure subscription
Input alias: ConnectedServiceName
. string
. Required.
Specify the Azure Resource Manager subscription for the deployment.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
appType
- App type
Input alias: WebAppKind
. string
. Required. Allowed values: app
(Web App), applinux
(Linux Web App), functionapp
(Function App (Not Recommended, Use Azure Functions Task)), api
(API App), mobileapp
(Mobile App). Default value: app
.
Specify the type of web app to deploy.
Note: Specify Linux Web App for built-in platform images or custom container image deployments.
:::moniker-end
:::moniker range="<=azure-pipelines-2022"
appType
- App type
Input alias: WebAppKind
. string
. Required. Allowed values: app
(Web App), applinux
(Linux Web App), functionapp
(Function App), api
(API App), mobileapp
(Mobile App). Default value: app
.
Specify the type of web app to deploy.
Note: Specify Linux Web App for built-in platform images or custom container image deployments.
:::moniker-end
:::moniker range="<=azure-pipelines"
WebAppName
- App Service name
string
. Required.
Specify the name of an existing Azure App Service. App services based on the selected app type will only be listed when using the task assistant.
:::moniker-end
:::moniker range="<=azure-pipelines"
DeployToSlotFlag
- Deploy to slot
boolean
. Optional. Use when WebAppKind != ""
. Default value: false
.
Use this option to deploy to an existing slot other than the Production slot. If this option is not selected, then the Azure App Service will be deployed to 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"
ImageSource
- Image Source
string
. Optional. Use when WebAppKind = applinux || WebAppKind = linux
. Allowed values: Registry
(Container Registry), Builtin
(Built-in Image). Default value: Registry
.
App Service on Linux offers two different options to publish your application:
Custom image deployment or app deployment with a built-in platform image.
:::moniker-end
:::moniker range="<=azure-pipelines"
AzureContainerRegistry
- Registry
string
. Required when ImageSource = AzureContainerRegistry
.
A globally unique top-level domain name for your specific registry.
Note: A fully qualified image name will be of the format: <registry>
/<repository>
:<tag>
. For example, myregistry.azurecr.io
/nginx:latest
.
:::moniker-end
:::moniker range="<=azure-pipelines"
AzureContainerRegistryLoginServer
- Registry Login Server Name
string
. Optional. Use when ImageSource = invalidimagesource
.
Specify an Azure container registry login server name.
:::moniker-end
:::moniker range="<=azure-pipelines"
AzureContainerRegistryImage
- Image
string
. Required when ImageSource = AzureContainerRegistry
.
The name of the repository where the container images are stored.
Note: A fully qualified image name will be of the format: <registry>
/<repository>
:<tag>
. For example, myregistry.azurecr.io
/nginx
:latest
.
:::moniker-end
:::moniker range="<=azure-pipelines"
AzureContainerRegistryTag
- Tag
string
. Optional. Use when ImageSource = AzureContainerRegistry
.
This is the mechanism that registries use to give Docker images a version.
Note: A fully qualified image name will be of the format: <registry>
/<repository>
:<tag>
. For example, myregistry.azurecr.io
/nginx
:latest
.
:::moniker-end
:::moniker range="<=azure-pipelines"
DockerRepositoryAccess
- Repository Access
string
. Required when ImageSource = invalidImage
. Allowed values: private
, public
. Default value: public
.
Specify the Docker repository access.
:::moniker-end
:::moniker range="<=azure-pipelines"
dockerRegistryConnection
- Registry Connection
Input alias: RegistryConnectedServiceName
. string
. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry
.
Specify the registry connection.
:::moniker-end
:::moniker range="<=azure-pipelines"
PrivateRegistryImage
- Image
string
. Required when ImageSource = PrivateRegistry
.
The name of the repository where the container images are stored.
Note: A fully qualified image name will be of the format: <registry>
<repository>
:<tag>
. For example, myregistry.azurecr.io
/nginx
:latest
.
:::moniker-end
:::moniker range="<=azure-pipelines"
PrivateRegistryTag
- Tag
string
. Optional. Use when ImageSource = PrivateRegistry
.
Tags are the mechanism that registries use to give Docker images a version.
Note: A fully qualified image name will be of the format: '<registry>
/<repository>
:<tag>
'. For example, myregistry.azurecr.io
/nginx
:latest
.
:::moniker-end
:::moniker range="<=azure-pipelines"
DockerNamespace
- Registry or Namespace
string
. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry
.
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"
DockerRepository
- Image
string
. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry
.
The name of the repository where the container images are stored.
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"
DockerImageTag
- Tag
string
. Optional. Use when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry
.
This is the mechanism that registries use to give Docker images a version.
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"
VirtualApplication
- Virtual application
string
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
.
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 when WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. Default value: $(System.DefaultWorkingDirectory)/**/*.zip
.
The file path to the package or a folder containing app service contents generated by MSBuild or a compressed zip or war file.
Variables are Build and Release. Wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\*\*/\*.zip
or $(System.DefaultWorkingDirectory)/\*\*/\*.war
.
:::moniker-end
:::moniker range="<=azure-pipelines"
packageForLinux
- Package or folder
Input alias: BuiltinLinuxPackage
. string
. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin
. Default value: $(System.DefaultWorkingDirectory)/**/*.zip
.
The file path to the package or a folder containing app service contents generated by MSBuild or a compressed zip or war file.
Variables are Build and Release. Wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\*\*/\*.zip
or $(System.DefaultWorkingDirectory)/\*\*/\*.war
.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
RuntimeStack
- Runtime Stack
string
. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin
.
Specify the framework and version.
:::moniker-end
:::moniker range="<=azure-pipelines"
StartupCommand
- Startup command
string
. Optional. Use when WebAppKind = applinux || WebAppKind = linux
.
Specify the startup command.
:::moniker-end
:::moniker range="<=azure-pipelines"
WebAppUri
- App Service URL
string
. Optional. Use when WebAppKind != ""
.
Specify a name for the output variable that is generated for the URL of the Azure App Service. The variable can be used in subsequent tasks.
:::moniker-end
:::moniker range="<=azure-pipelines"
ScriptType
- Deployment script type
string
. Optional. Use when WebAppKind != ""
. Allowed values: Inline Script
, File Path
(Script File Path).
Customizes the deployment by providing a script that will run on the Azure App service once the task has completed the deployment successfully . For example, this can restore packages for Node, PHP, and Python applications. Learn more about Azure App Service Deployment.
:::moniker-end
:::moniker range="<=azure-pipelines"
InlineScript
- Inline Script
string
. Required when ScriptType == Inline Script && WebAppKind != ""
. Default value: :: You can provide your deployment commands here. One command per line.
.
:::moniker-end
:::moniker range="<=azure-pipelines"
ScriptPath
- Deployment script path
string
. Required when ScriptType == File Path && WebAppKind != ""
.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
GenerateWebConfig
- Generate Web.config
boolean
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war
. Default value: false
.
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 the node.js
application, web.config
will have startup file and iis_node
module values. Learn more about Azure App Service Deployment.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
WebConfigParameters
- Web.config parameters
string
. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war
.
Edits values like startup files in the generated web.config
file. This edit feature is only for the generated web.config
. Learn more about Azure App Service Deployment.
:::moniker-end
:::moniker range="<=azure-pipelines"
AppSettings
- App settings
string
.
Edits web app application settings following the syntax -key value . Values containing spaces should be enclosed in double quotes.
Examples: -Port 5000
-RequestTimeout 5000
-WEBSITE_TIME_ZONE
"Eastern Standard Time"
.
:::moniker-end
:::moniker range="<=azure-pipelines"
ConfigurationSettings
- Configuration settings
string
.
Edits web app configuration settings following the syntax -key
value. Values containing spaces should be enclosed in double quotes.
Examples: -phpVersion 5.6
-linuxFxVersion: node|6.11
.
:::moniker-end
:::moniker range="<=azure-pipelines"
TakeAppOfflineFlag
- Take App Offline
boolean
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. 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
:::moniker range="<=azure-pipelines"
UseWebDeploy
- Publish using Web Deploy
boolean
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. Default value: false
.
Publish using Web Deploy
options are supported only when using Windows agent. On other platforms, the task relies on Kudu REST APIs to deploy the Azure App Service, and following options are not supported.
:::moniker-end
:::moniker range="<=azure-pipelines"
SetParametersFile
- SetParameters file
string
. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
.
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 && WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. 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.
Note: This will also remove all files related to any extension installed on this Azure App Service. To prevent this, select the Exclude files from App_Data folder
checkbox.
:::moniker-end
:::moniker range="<=azure-pipelines"
ExcludeFilesFromAppDataFlag
- Exclude files from the App_Data folder
boolean
. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. Default value: false
.
Use this option to prevent files in the App_Data
folder from being deployed to/deleted from the Azure App Service.
:::moniker-end
:::moniker range="<=azure-pipelines"
AdditionalArguments
- Additional arguments
string
. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
.
The additional Web Deploy arguments following the syntax -key:value
.
These will be applied when deploying the Azure App Service. Examples: -disableLink:AppPoolExtension
-disableLink:ContentExtension
.
See more examples of Web Deploy Operation Settings.
:::moniker-end
:::moniker range="<=azure-pipelines"
RenameFilesFlag
- Rename locked files
boolean
. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != ""
. Default value: false
.
Use this option to enable msdeploy flag MSDEPLOY_RENAME_LOCKED_FILES=1
in Azure App Service application settings. The option enables msdeploy to rename locked files that are locked during app deployment.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
enableXmlTransform
- XML transformation
Input alias: XmlTransformation
. boolean
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war
. Default value: false
.
The config transforms will be run for *.Release.config
and *.<EnvironmentName>.config
on the *.config file
.
Config transforms will be run prior to the Variable Substitution.
XML transformations are supported only for Windows platform.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
enableXmlVariableSubstitution
- XML variable substitution
Input alias: XmlVariableSubstitution
. boolean
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war
. Default value: false
.
Variables defined in the build or release pipeline will be matched against the key
or name
entries in the appSettings
, applicationSettings
, and connectionStrings
sections of any config file and parameters.xml
. Variable Substitution is run after config transforms.
Note: If the same variables are defined in the release pipeline and in the environment, then the environment variables will supersede the release pipeline variables.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
JSONFiles
- JSON variable substitution
string
. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war
.
Provides a new lines-separated list of JSON files to substitute the variable values. Files names are to be provided relative to the root folder.
To substitute JSON variables that are nested or hierarchical, specify them using JSONPath
expressions.
For example, to replace the value of ConnectionString
in the sample below, you need to define a variable as Data.DefaultConnection.ConnectionString
in the build/release pipeline (or the release pipeline’s environment).
{
"Data": {
"DefaultConnection": {
"ConnectionString": "Server=(localdb)\SQLEXPRESS;Database=MyDB;Trusted_Connection=True"
}
}
}
Variable Substitution is run after configuration transforms.
Note: pipeline variables are excluded in substitution.
:::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
There is a newer version of this task available. For more information, see AzureRmWebAppDeployment@4.
:::moniker range=">azure-pipelines-2022.1"
[!INCLUDE rm-web-app-deployment-authentication]
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
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