AzureRmWebAppDeployment@3 - Azure App Service deploy v3 task

Update Azure WebApp Services On Windows, Web App on Linux with built-in images or docker containers, ASP.NET, .NET Core, PHP, Python or Node based Web applications, Function Apps, Mobile Apps, Api applications, and Web Jobs using Web Deploy/Kudu REST APIs.

Inputs

azureSubscription - Azure subscription
Input alias: ConnectedServiceName. string. Required.

Specify the Azure Resource Manager subscription for the deployment.


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.


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.


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.


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.


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.


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.


AzureContainerRegistryLoginServer - Registry Login Server Name
string. Optional. Use when ImageSource = invalidimagesource.

Specify an Azure container registry login server name.


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.


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.


DockerRepositoryAccess - Repository Access
string. Required when ImageSource = invalidImage. Allowed values: private, public. Default value: public.

Specify the Docker repository access.


dockerRegistryConnection - Registry Connection
Input alias: RegistryConnectedServiceName. string. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry.

Specify the registry connection.


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.


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.


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.


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.


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.


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.


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.


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.


RuntimeStack - Runtime Stack
string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Allowed values: node|4.4 (Node.js 4.4), node|4.5 (Node.js 4.5), node|6.2 (Node.js 6.2), node|6.6 (Node.js 6.6), node|6.9 (Node.js 6.9), node|6.10 (Node.js 6.10), node|6.11 (Node.js 6.11), node|8.0 (Node.js 8.0), node|8.1 (Node.js 8.1), php|5.6 (PHP 5.6), php|7.0 (PHP 7.0), dotnetcore|1.0 (.NET Core 1.0), dotnetcore|1.1 (.NET Core 1.1), dotnetcore|2.0 (.NET Core 2.0), ruby|2.3 (Ruby 2.3).

Specify the framework and version.


StartupCommand - Startup command
string. Optional. Use when WebAppKind = applinux || WebAppKind = linux.

Specify the startup command.


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.


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.


InlineScript - Inline Script
string. Required when ScriptType == Inline Script && WebAppKind != "". Default value: :: You can provide your deployment commands here. One command per line..


ScriptPath - Deployment script path
string. Required when ScriptType == File Path && WebAppKind != "".


GenerateWebConfig - Generate Web.config
boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". 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.


WebConfigParameters - Web.config parameters
string. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

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.


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".


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.


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.


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.


SetParametersFile - SetParameters file
string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

The location of the SetParameters.xml file to use.


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.


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.


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.


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.


enableXmlTransform - XML transformation
Input alias: XmlTransformation. boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". 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.


enableXmlVariableSubstitution - XML variable substitution
Input alias: XmlVariableSubstitution. boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". 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.


JSONFiles - JSON variable substitution
string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

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.


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 2.104.1 or greater
Task category Deploy