Dela via


AzureRmWebAppDeployment@4 – Azure App Service distribuerar v4-uppgift

Använd den här uppgiften för att distribuera en webb-, mobil- eller API-app till Azure App Service med Docker, Java, .NET, .NET Core, Node.js, PHP, Python eller Ruby.

Note

Use AzureFunctionApp@2 to deploy Azure Functions apps.

Syntax

# Azure App Service deploy v4
# 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@4
  inputs:
    ConnectionType: 'AzureRM' # 'AzureRM' | 'PublishProfile'. Required. Connection type. Default: AzureRM.
    azureSubscription: # string. Alias: ConnectedServiceName. Required when ConnectionType = AzureRM. Azure subscription. 
    #PublishProfilePath: '$(System.DefaultWorkingDirectory)/**/*.pubxml' # string. Required when ConnectionType = PublishProfile. Publish profile path. Default: $(System.DefaultWorkingDirectory)/**/*.pubxml.
    #PublishProfilePassword: # string. Required when ConnectionType = PublishProfile. Publish profile password. 
    appType: 'webApp' # 'webApp' | 'webAppLinux' | 'webAppContainer' | 'webAppHyperVContainer' | 'functionApp' | 'functionAppLinux' | 'functionAppContainer' | 'apiApp' | 'mobileApp'. Alias: WebAppKind. Required when ConnectionType = AzureRM. App Service type. Default: webApp.
    WebAppName: # string. Required when ConnectionType = AzureRM. App Service name. 
    #deployToSlotOrASE: false # boolean. Alias: DeployToSlotOrASEFlag. Optional. Use when ConnectionType = AzureRM && WebAppKind != "". Deploy to Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotOrASEFlag = true. Resource group. 
    #SlotName: 'production' # string. Required when DeployToSlotOrASEFlag = true. Slot. Default: production.
    #DockerNamespace: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "". Virtual application. 
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: Package. Required when ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Optional. Use when WebAppKind = webAppLinux. Runtime Stack. 
    #RuntimeStackFunction: # 'DOTNET|2.2' | 'DOTNET|3.1' | 'JAVA|8' | 'JAVA|11' | 'NODE|8' | 'NODE|10' | 'NODE|12' | 'NODE|14' | 'NODE|20' | 'NODE|22' | 'PYTHON|3.6' | 'PYTHON|3.7' | 'PYTHON|3.8'. Optional. Use when WebAppKind = functionAppLinux. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppKind = webAppHyperVContainer. Startup command. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Deployment script path. 
  # File Transforms & Variable Substitution Options
    #WebConfigParameters: # string. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Generate web.config parameters for Python, Node.js, Go and Java apps. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. Optional. Use when ConnectionType = AzureRM. App settings. 
    #ConfigurationSettings: # string. Optional. Use when ConnectionType = AzureRM. Configuration settings. 
  # Additional Deployment Options
    #enableCustomDeployment: false # boolean. Alias: UseWebDeploy. Optional. Use when ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Select deployment method. Default: false.
    #DeploymentType: 'webDeploy' # 'webDeploy' | 'zipDeploy' | 'runFromZip'. Required when UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Deployment method. Default: webDeploy.
    #TakeAppOfflineFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Take App Offline. Default: true.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Exclude files from the App_Data folder. Default: true.
    #AdditionalArguments: '-retryAttempts:6 -retryInterval:10000' # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Additional arguments. Default: -retryAttempts:6 -retryInterval:10000.
    #RenameFilesFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Rename locked files. Default: true.
# Azure App Service deploy v4
# 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@4
  inputs:
    ConnectionType: 'AzureRM' # 'AzureRM' | 'PublishProfile'. Required. Connection type. Default: AzureRM.
    azureSubscription: # string. Alias: ConnectedServiceName. Required when ConnectionType = AzureRM. Azure subscription. 
    #PublishProfilePath: '$(System.DefaultWorkingDirectory)/**/*.pubxml' # string. Required when ConnectionType = PublishProfile. Publish profile path. Default: $(System.DefaultWorkingDirectory)/**/*.pubxml.
    #PublishProfilePassword: # string. Required when ConnectionType = PublishProfile. Publish profile password. 
    appType: 'webApp' # 'webApp' | 'webAppLinux' | 'webAppContainer' | 'webAppHyperVContainer' | 'functionApp' | 'functionAppLinux' | 'functionAppContainer' | 'apiApp' | 'mobileApp'. Alias: WebAppKind. Required when ConnectionType = AzureRM. App Service type. Default: webApp.
    WebAppName: # string. Required when ConnectionType = AzureRM. App Service name. 
    #deployToSlotOrASE: false # boolean. Alias: DeployToSlotOrASEFlag. Optional. Use when ConnectionType = AzureRM && WebAppKind != "". Deploy to Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotOrASEFlag = true. Resource group. 
    #SlotName: 'production' # string. Required when DeployToSlotOrASEFlag = true. Slot. Default: production.
    #DockerNamespace: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "". Virtual application. 
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: Package. Required when ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Optional. Use when WebAppKind = webAppLinux. Runtime Stack. 
    #RuntimeStackFunction: # 'DOTNET|2.2' | 'DOTNET|3.1' | 'JAVA|8' | 'JAVA|11' | 'NODE|8' | 'NODE|10' | 'NODE|12' | 'NODE|14' | 'PYTHON|3.6' | 'PYTHON|3.7' | 'PYTHON|3.8'. Optional. Use when WebAppKind = functionAppLinux. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppKind = webAppHyperVContainer. Startup command. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Deployment script path. 
  # File Transforms & Variable Substitution Options
    #WebConfigParameters: # string. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Generate web.config parameters for Python, Node.js, Go and Java apps. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. Optional. Use when ConnectionType = AzureRM. App settings. 
    #ConfigurationSettings: # string. Optional. Use when ConnectionType = AzureRM. Configuration settings. 
  # Additional Deployment Options
    #enableCustomDeployment: false # boolean. Alias: UseWebDeploy. Optional. Use when ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Select deployment method. Default: false.
    #DeploymentType: 'webDeploy' # 'webDeploy' | 'zipDeploy' | 'runFromZip'. Required when UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Deployment method. Default: webDeploy.
    #TakeAppOfflineFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Take App Offline. Default: true.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Exclude files from the App_Data folder. Default: true.
    #AdditionalArguments: '-retryAttempts:6 -retryInterval:10000' # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Additional arguments. Default: -retryAttempts:6 -retryInterval:10000.
    #RenameFilesFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Rename locked files. Default: true.
# Azure App Service deploy v4
# 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@4
  inputs:
    ConnectionType: 'AzureRM' # 'AzureRM' | 'PublishProfile'. Required. Connection type. Default: AzureRM.
    azureSubscription: # string. Alias: ConnectedServiceName. Required when ConnectionType = AzureRM. Azure subscription. 
    #PublishProfilePath: '$(System.DefaultWorkingDirectory)/**/*.pubxml' # string. Required when ConnectionType = PublishProfile. Publish profile path. Default: $(System.DefaultWorkingDirectory)/**/*.pubxml.
    #PublishProfilePassword: # string. Required when ConnectionType = PublishProfile. Publish profile password. 
    appType: 'webApp' # 'webApp' | 'webAppLinux' | 'webAppContainer' | 'webAppHyperVContainer' | 'functionApp' | 'functionAppLinux' | 'functionAppContainer' | 'apiApp' | 'mobileApp'. Alias: WebAppKind. Required when ConnectionType = AzureRM. App Service type. Default: webApp.
    WebAppName: # string. Required when ConnectionType = AzureRM. App Service name. 
    #deployToSlotOrASE: false # boolean. Alias: DeployToSlotOrASEFlag. Optional. Use when ConnectionType = AzureRM && WebAppKind != "". Deploy to Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotOrASEFlag = true. Resource group. 
    #SlotName: 'production' # string. Required when DeployToSlotOrASEFlag = true. Slot. Default: production.
    #DockerNamespace: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "". Virtual application. 
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: Package. Required when ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Optional. Use when WebAppKind = webAppLinux. Runtime Stack. 
    #RuntimeStackFunction: # 'DOTNET|2.2' | 'DOTNET|3.1' | 'JAVA|8' | 'JAVA|11' | 'NODE|8' | 'NODE|10' | 'NODE|12' | 'NODE|14' | 'PYTHON|3.6' | 'PYTHON|3.7' | 'PYTHON|3.8'. Optional. Use when WebAppKind = functionAppLinux. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppkind = webAppHyperVContainer. Startup command. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script path. 
  # File Transforms & Variable Substitution Options
    #WebConfigParameters: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Generate web.config parameters for Python, Node.js, Go and Java apps. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. Optional. Use when ConnectionType = AzureRM. App settings. 
    #ConfigurationSettings: # string. Optional. Use when ConnectionType = AzureRM. Configuration settings. 
  # Additional Deployment Options
    #enableCustomDeployment: false # boolean. Alias: UseWebDeploy. Optional. Use when ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Select deployment method. Default: false.
    #DeploymentType: 'webDeploy' # 'webDeploy' | 'zipDeploy' | 'runFromZip'. Required when UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Deployment method. Default: webDeploy.
    #TakeAppOfflineFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Take App Offline. Default: true.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Exclude files from the App_Data folder. Default: true.
    #AdditionalArguments: '-retryAttempts:6 -retryInterval:10000' # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Additional arguments. Default: -retryAttempts:6 -retryInterval:10000.
    #RenameFilesFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Rename locked files. Default: true.
# Azure App Service deploy v4
# 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@4
  inputs:
    ConnectionType: 'AzureRM' # 'AzureRM' | 'PublishProfile'. Required. Connection type. Default: AzureRM.
    azureSubscription: # string. Alias: ConnectedServiceName. Required when ConnectionType = AzureRM. Azure subscription. 
    #PublishProfilePath: '$(System.DefaultWorkingDirectory)/**/*.pubxml' # string. Required when ConnectionType = PublishProfile. Publish profile path. Default: $(System.DefaultWorkingDirectory)/**/*.pubxml.
    #PublishProfilePassword: # string. Required when ConnectionType = PublishProfile. Publish profile password. 
    appType: 'webApp' # 'webApp' | 'webAppLinux' | 'webAppContainer' | 'functionApp' | 'functionAppLinux' | 'functionAppContainer' | 'apiApp' | 'mobileApp'. Alias: WebAppKind. Required when ConnectionType = AzureRM. App Service type. Default: webApp.
    WebAppName: # string. Required when ConnectionType = AzureRM. App Service name. 
    #deployToSlotOrASE: false # boolean. Alias: DeployToSlotOrASEFlag. Optional. Use when ConnectionType = AzureRM && WebAppKind != "". Deploy to Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotOrASEFlag = true. Resource group. 
    #SlotName: 'production' # string. Required when DeployToSlotOrASEFlag = true. Slot. Default: production.
    #DockerNamespace: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "". Virtual application. 
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: Package. Required when ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Optional. Use when WebAppKind = webAppLinux. Runtime Stack. 
    #RuntimeStackFunction: # 'DOTNET|2.2' | 'DOTNET|3.1' | 'JAVA|8' | 'JAVA|11' | 'NODE|8' | 'NODE|10' | 'NODE|12' | 'NODE|14' | 'PYTHON|3.6' | 'PYTHON|3.7' | 'PYTHON|3.8'. Optional. Use when WebAppKind = functionAppLinux. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux. Startup command. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script path. 
  # File Transforms & Variable Substitution Options
    #WebConfigParameters: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Generate web.config parameters for Python, Node.js, Go and Java apps. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. Optional. Use when ConnectionType = AzureRM. App settings. 
    #ConfigurationSettings: # string. Optional. Use when ConnectionType = AzureRM. Configuration settings. 
  # Additional Deployment Options
    #enableCustomDeployment: false # boolean. Alias: UseWebDeploy. Optional. Use when ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Select deployment method. Default: false.
    #DeploymentType: 'webDeploy' # 'webDeploy' | 'zipDeploy' | 'runFromZip'. Required when UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Deployment method. Default: webDeploy.
    #TakeAppOfflineFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Take App Offline. Default: true.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Exclude files from the App_Data folder. Default: true.
    #AdditionalArguments: '-retryAttempts:6 -retryInterval:10000' # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Additional arguments. Default: -retryAttempts:6 -retryInterval:10000.
    #RenameFilesFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Rename locked files. Default: true.
# Azure App Service deploy v4
# 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@4
  inputs:
    ConnectionType: 'AzureRM' # 'AzureRM' | 'PublishProfile'. Required. Connection type. Default: AzureRM.
    azureSubscription: # string. Alias: ConnectedServiceName. Required when ConnectionType = AzureRM. Azure subscription. 
    #PublishProfilePath: '$(System.DefaultWorkingDirectory)/**/*.pubxml' # string. Required when ConnectionType = PublishProfile. Publish profile path. Default: $(System.DefaultWorkingDirectory)/**/*.pubxml.
    #PublishProfilePassword: # string. Required when ConnectionType = PublishProfile. Publish profile password. 
    appType: 'webApp' # 'webApp' | 'webAppLinux' | 'webAppContainer' | 'functionApp' | 'functionAppLinux' | 'functionAppContainer' | 'apiApp' | 'mobileApp'. Alias: WebAppKind. Required when ConnectionType = AzureRM. App Service type. Default: webApp.
    WebAppName: # string. Required when ConnectionType = AzureRM. App Service name. 
    #deployToSlotOrASE: false # boolean. Alias: DeployToSlotOrASEFlag. Optional. Use when ConnectionType = AzureRM && WebAppKind != "". Deploy to Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotOrASEFlag = true. Resource group. 
    #SlotName: 'production' # string. Required when DeployToSlotOrASEFlag = true. Slot. Default: production.
    #DockerNamespace: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind = webAppContainer || WebAppkind = functionAppContainer. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "". Virtual application. 
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: Package. Required when ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Optional. Use when WebAppKind = webAppLinux. Runtime Stack. 
    #RuntimeStackFunction: # 'DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0' | 'DOCKER|microsoft/azure-functions-node8:2.0'. Optional. Use when WebAppKind = functionAppLinux. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux. Startup command. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Deployment script path. 
  # File Transforms & Variable Substitution Options
    #WebConfigParameters: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Generate web.config parameters for Python, Node.js, Go and Java apps. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. Optional. Use when ConnectionType = AzureRM. App settings. 
    #ConfigurationSettings: # string. Optional. Use when ConnectionType = AzureRM. Configuration settings. 
  # Additional Deployment Options
    #enableCustomDeployment: false # boolean. Alias: UseWebDeploy. Optional. Use when ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Select deployment method. Default: false.
    #DeploymentType: 'webDeploy' # 'webDeploy' | 'zipDeploy' | 'runFromZip'. Required when UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Deployment method. Default: webDeploy.
    #TakeAppOfflineFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Take App Offline. Default: true.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Exclude files from the App_Data folder. Default: true.
    #AdditionalArguments: '-retryAttempts:6 -retryInterval:10000' # string. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Additional arguments. Default: -retryAttempts:6 -retryInterval:10000.
    #RenameFilesFlag: true # boolean. Optional. Use when UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Rename locked files. Default: true.

Inputs

ConnectionType - Connection type
string. Required. Tillåtna värden: AzureRM (Azure Resource Manager), PublishProfile (publiceringsprofil). Standardvärde: AzureRM.

Ange den tjänstanslutningstyp som ska användas för att distribuera webbappen.

Specify Publish Profile for using Visual Studio created Publish profiles.


azureSubscription - Azure subscription
Input alias: ConnectedServiceName. string. Krävs när ConnectionType = AzureRM.

Ange Azure Resource Manager-prenumerationen för distributionen.


PublishProfilePath - Publicera profilsökväg
string. Krävs när ConnectionType = PublishProfile. Standardvärde: $(System.DefaultWorkingDirectory)/**/*.pubxml.

The path of the publish profile created from Visual Studio.


PublishProfilePassword - Publicera profillösenord
string. Krävs när ConnectionType = PublishProfile.

Vi rekommenderar att du lagrar ett lösenord i en hemlig variabel och använder variabeln här, t.ex. $(Password).


appType - App Service-typ
Input alias: WebAppKind. string. Krävs när ConnectionType = AzureRM. Tillåtna värden: webApp (webbapp i Windows), webAppLinux (webbapp på Linux), webAppContainer (Web App for Containers (Linux)), webAppHyperVContainer (Web App for Containers (Windows)), functionApp (funktionsapp i Windows (rekommenderas inte, Använd Azure Functions-uppgift)), functionAppLinux (funktionsapp i Linux (rekommenderas inte, använd Azure Functions-uppgift)), functionAppContainer (funktionsapp för containrar (Linux) (rekommenderas inte, Använd Azure Functions för containeraktivitet)), apiApp (API App), mobileApp (Mobilapp). Standardvärde: webApp.

Välj mellan Webbapp i Windows, Webbapp på Linux, Webbapp för containrar, Funktionsapp, Funktionsapp i Linux, Funktionsapp för containrar och Mobilapp.


appType - App Service-typ
Input alias: WebAppKind. string. Krävs när ConnectionType = AzureRM. Tillåtna värden: webApp (webbapp i Windows), webAppLinux (webbapp i Linux), webAppContainer (Web App for Containers (Linux)), functionApp (funktionsapp i Windows), functionAppLinux (funktionsapp på Linux), functionAppContainer (Funktionsapp för containrar (Linux)), apiApp (API App), mobileApp (mobilapp). Standardvärde: webApp.

Välj mellan Webbapp i Windows, Webbapp på Linux, Webbapp för containrar, Funktionsapp, Funktionsapp i Linux, Funktionsapp för containrar och Mobilapp.


WebAppName - App Service-namn
string. Krävs när ConnectionType = AzureRM.

Ange namnet på en befintlig Azure App Service. Apptjänster baserat på den valda apptypen visas bara när du använder aktivitetsassistenten.


deployToSlotOrASE - Distribuera till fack eller App Service Environment
Input alias: DeployToSlotOrASEFlag. boolean. Optional. Använd när ConnectionType = AzureRM && WebAppKind != "". Standardvärde: false.

Ange alternativet för att distribuera till ett befintligt distributionsfack eller En Azure App Service-miljö. För båda målen kräver uppgiften ett resursgruppsnamn. If the deployment target is a slot, by default the deployment is to the Production slot. Alla andra befintliga facknamn kan anges. Om distributionsmålet är en Azure App Service-miljö lämnar du platsnamnet som Production och anger bara resursgruppens namn.


ResourceGroupName - Resource group
string. Krävs när DeployToSlotOrASEFlag = true.

Resursgruppens namn krävs när distributionsmålet antingen är ett distributionsfack eller en App Service-miljö.

Ange den Azure-resursgrupp som innehåller Azure App Service som anges ovan.


SlotName - Slot
string. Krävs när DeployToSlotOrASEFlag = true. Standardvärde: production.

Ange ett annat befintligt fack än produktionsplatsen.


DockerNamespace - register eller namnområde
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Ett globalt unikt toppnivådomännamn för ditt specifika register eller namnområde. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerNamespace - register eller namnområde
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Ett globalt unikt toppnivådomännamn för ditt specifika register eller namnområde. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerNamespace - register eller namnområde
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Ett globalt unikt toppnivådomännamn för ditt specifika register eller namnområde. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerRepository - Image
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Namnet på lagringsplatsen där containeravbildningarna lagras. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerRepository - Image
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Namnet på lagringsplatsen där containeravbildningarna lagras. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerRepository - Image
string. Krävs när WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Namnet på lagringsplatsen där containeravbildningarna lagras. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerImageTag - Tag
string. Optional. Använd när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Taggar är den mekanism som register använder för att tillämpa versionsinformation på Docker-avbildningar. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerImageTag - Tag
string. Optional. Använd när WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Taggar är den mekanism som register använder för att tillämpa versionsinformation på Docker-avbildningar. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


DockerImageTag - Tag
string. Optional. Använd när WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Taggar är den mekanism som register använder för att tillämpa versionsinformation på Docker-avbildningar. Obs! Det fullständigt kvalificerade avbildningsnamnet kommer att vara av formatet: {registry or namespace}/{repository}:{tag}. Till exempel myregistry.azurecr.io/nginx:latest.


VirtualApplication - Virtual application
string. Optional. Använd när WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "".

Ange namnet på det virtuella program som har konfigurerats i Azure-portalen. Det här alternativet krävs inte för distributioner till webbplatsroten. Det virtuella programmet måste ha konfigurerats innan webbprojektet distribuerades.


VirtualApplication - Virtual application
string. Optional. Använd när WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "".

Ange namnet på det virtuella program som har konfigurerats i Azure-portalen. Det här alternativet krävs inte för distributioner till webbplatsroten. Det virtuella programmet måste ha konfigurerats innan webbprojektet distribuerades.


packageForLinux - paket eller mapp
Input alias: Package. string. Krävs när ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Standardvärde: $(System.DefaultWorkingDirectory)/**/*.zip.

Filsökvägen till paketet eller till en mapp som innehåller apptjänstinnehåll som genererats av MSBuild eller en komprimerad zip- eller war-fil.

Variables are Build and Release. Wildcards are supported.

Till exempel $(System.DefaultWorkingDirectory)/\*\*/\*.zip eller $(System.DefaultWorkingDirectory)/\*\*/\*.war.


RuntimeStack - Runtime Stack
string. Optional. Använd när WebAppKind = webAppLinux.

Ange ramverket och versionen.


RuntimeStackFunction - Runtime Stack
string. Optional. Använd när WebAppKind = functionAppLinux. Tillåtna värden: DOTNET|2.2 (DOTNET|2.2 (functionapp v2)), DOTNET|3.1 (DOTNET|3.1 (functionapp v3)), JAVA|8 (JAVA|8 (functionapp v2/v3)), JAVA|11 (JAVA|11 (functionapp v3)), NODE|8 (NODE|8 (functionapp v2)), NODE|10 (NODE|10 (functionapp v2/v3)), NODE|12 (NODE|12 (functionapp v3)), NODE|14 (NODE|14 (functionapp v3)), NODE|20 (NODE|20 (functionapp v4)), NODE|22 (NODE|22 (functionapp v4)), PYTHON|3.6 (PYTHON|3.6 (functionapp v2/v3)), PYTHON|3.7 (PYTHON|3.7 (functionapp v2/v3)), PYTHON|3.8 (PYTHON|3.8 (functionapp v3)).

Ange ramverket och versionen. Se översikten över Azure Functions-körningsversioner för körningsversioner som stöds. Gamla värden som DOCKER|microsoft/azure-functions-* är inaktuella. Använd de nya värdena från listrutan.


RuntimeStackFunction - Runtime Stack
string. Optional. Använd när WebAppKind = functionAppLinux. Tillåtna värden: DOTNET|2.2 (DOTNET|2.2 (functionapp v2)), DOTNET|3.1 (DOTNET|3.1 (functionapp v3)), JAVA|8 (JAVA|8 (functionapp v2/v3)), JAVA|11 (JAVA|11 (funktionsapp v3)), NODE|8 (NODE|8 (functionapp v2)), NODE|10 (NODE|10 (functionapp v2/v3)), NODE|12 (NODE|12 (functionapp v3)), NODE|14 (NODE|14 (functionapp v3)), PYTHON|3.6 (PYTHON|3.6 (functionapp v2/v3)), PYTHON|3.7 (PYTHON|3.7 (functionapp v2/v3)), PYTHON|3.8 (PYTHON|3.8 (functionapp v3)).

Ange ramverket och versionen. Se översikten över Azure Functions-körningsversioner för körningsversioner som stöds. Gamla värden som DOCKER|microsoft/azure-functions-* är inaktuella. Använd de nya värdena från listrutan.


RuntimeStackFunction - Runtime Stack
string. Optional. Använd när WebAppKind = functionAppLinux. Tillåtna värden: DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0 (.NET), DOCKER|microsoft/azure-functions-node8:2.0 (JavaScript).

Ange ramverket och versionen.


StartupCommand - Startup command
string. Optional. Använd när WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppKind = webAppHyperVContainer.

Ange kommandot Start. For example:

dotnet exec filename.dll

dotnet filename.dll.


StartupCommand - Startup command
string. Optional. Använd när WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppkind = webAppHyperVContainer.

Ange kommandot Start. For example:

dotnet exec filename.dll

dotnet filename.dll.


StartupCommand - Startup command
string. Optional. Använd när WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux.

Ange kommandot Start. For example:

dotnet exec filename.dll

dotnet filename.dll.


ScriptType - Distributionsskripttyp
string. Optional. Använd när ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Tillåtna värden: Inline Script, File Path (sökväg till skriptfil).

Anpassar distributionen genom att tillhandahålla ett skript som körs på Azure App Service efter distributionen. Välj infogat distributionsskript eller sökvägen och namnet på en skriptfil. Läs mer om Azure App Service Deployment.


ScriptType - Distributionsskripttyp
string. Optional. Använd när ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Tillåtna värden: Inline Script, File Path (sökväg till skriptfil).

Anpassar distributionen genom att tillhandahålla ett skript som körs på Azure App Service efter distributionen. Välj infogat distributionsskript eller sökvägen och namnet på en skriptfil. Läs mer om Azure App Service Deployment.


InlineScript - Inline Script
string. Krävs när ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Standardvärde: :: You can provide your deployment commands here. One command per line..

Skriptet som ska köras. Du kan ange dina distributionskommandon här, ett kommando per rad. Se följande exempel.


InlineScript - Inline Script
string. Krävs när ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Standardvärde: :: You can provide your deployment commands here. One command per line..

Skriptet som ska köras. Du kan ange dina distributionskommandon här, ett kommando per rad. Se följande exempel.


ScriptPath - Distributionsskriptsökväg
string. Krävs när ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer.

Sökvägen och namnet på skriptet som ska köras.


ScriptPath - Distributionsskriptsökväg
string. Krävs när ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer.

Sökvägen och namnet på skriptet som ska köras.


WebConfigParameters - Generera web.config parametrar för Python, Node.js, Go och Java-appar
string. Optional. Använd när WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

En standard Web.config genereras och distribueras till Azure App Service om programmet inte har någon. Värdena i web.config kan redigeras och variera beroende på programramverket. För node.js program har web.config till exempel en startfil och iis_node modulvärden. Den här redigeringsfunktionen är endast avsedd för den genererade web.config. Läs mer om Azure App Service Deployment.


WebConfigParameters - Generera web.config parametrar för Python, Node.js, Go och Java-appar
string. Optional. Använd när WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

En standard Web.config genereras och distribueras till Azure App Service om programmet inte har någon. Värdena i web.config kan redigeras och variera beroende på programramverket. För node.js program har web.config till exempel en startfil och iis_node modulvärden. Den här redigeringsfunktionen är endast avsedd för den genererade web.config. Läs mer om Azure App Service Deployment.


AppSettings - App settings
string. Optional. Använd när ConnectionType = AzureRM.

Redigerar programinställningar för webbappar med hjälp av syntaxen -key value. Värden som innehåller blanksteg måste omges av dubbla citattecken. Exempel: -Port 5000 -RequestTimeout 5000 och -WEBSITE_TIME_ZONE "Eastern Standard Time". Om du vill ange två eller flera nyckelvärden måste nyckelvärdena avgränsas med ett blanksteg. Exempel: -key1 "Value1" -Key2 "Value2".


ConfigurationSettings - Configuration settings
string. Optional. Använd när ConnectionType = AzureRM.

Redigerar konfigurationsinställningar för webbappar med hjälp av syntaxen -key value. Värden som innehåller blanksteg måste omges av dubbla citattecken. Exempel: -phpVersion 5.6 -linuxFxVersion node|6.11.


enableCustomDeployment - Välj distributionsmetod
Input alias: UseWebDeploy. boolean. Optional. Använd när ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: false.

Om den är avmarkerad eller falsk identifierar uppgiften automatiskt den bästa distributionsmetoden baserat på apptyp, paketformat och andra parametrar. Kontrollera det här alternativet i aktivitetsassistenten för att visa de distributionsmetoder som stöds och välj en för att distribuera din app.


enableCustomDeployment - Välj distributionsmetod
Input alias: UseWebDeploy. boolean. Optional. Använd när ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: false.

Om den är avmarkerad eller falsk identifierar uppgiften automatiskt den bästa distributionsmetoden baserat på apptyp, paketformat och andra parametrar. Kontrollera det här alternativet i aktivitetsassistenten för att visa de distributionsmetoder som stöds och välj en för att distribuera din app.


DeploymentType - Deployment method
string. Krävs när UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Tillåtna värden: webDeploy (webbdistribution), zipDeploy (Zip Deploy), runFromZip (Kör från paket). Standardvärde: webDeploy.

Avgör distributionsmetoden för appen.


DeploymentType - Deployment method
string. Krävs när UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Tillåtna värden: webDeploy (webbdistribution), zipDeploy (Zip Deploy), runFromZip (Kör från paket). Standardvärde: webDeploy.

Avgör distributionsmetoden för appen.


TakeAppOfflineFlag - ta appen offline
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange det här alternativet för att ta Azure App Service offline genom att placera en app_offline.htm fil i rotkatalogen innan synkroniseringen påbörjas. Filen tas bort när synkroniseringen har slutförts.


TakeAppOfflineFlag - ta appen offline
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange det här alternativet för att ta Azure App Service offline genom att placera en app_offline.htm fil i rotkatalogen innan synkroniseringen påbörjas. Filen tas bort när synkroniseringen har slutförts.


SetParametersFile - SetParameters file
string. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar.

Platsen för den SetParameters.xml fil som ska användas.


SetParametersFile - SetParameters file
string. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar.

Platsen för den SetParameters.xml fil som ska användas.


RemoveAdditionalFilesFlag - Ta bort ytterligare filer vid mål
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: false.

Ange "true" för att ta bort filer på Azure App Service som inte har några matchande filer i App Service-paketet eller mappen. Detta tar också bort alla filer som är relaterade till alla tillägg som är installerade på den här Azure App Service. Om du vill förhindra detta markerar du kryssrutan Exclude files from App_Data folder.


RemoveAdditionalFilesFlag - Ta bort ytterligare filer vid mål
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: false.

Ange "true" för att ta bort filer på Azure App Service som inte har några matchande filer i App Service-paketet eller mappen. Detta tar också bort alla filer som är relaterade till alla tillägg som är installerade på den här Azure App Service. Om du vill förhindra detta markerar du kryssrutan Exclude files from App_Data folder.


ExcludeFilesFromAppDataFlag - Undanta filer från mappen App_Data
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange alternativet för att förhindra att filer i mappen App_Data distribueras till/tas bort från Azure App Service.


ExcludeFilesFromAppDataFlag - Undanta filer från mappen App_Data
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange alternativet för att förhindra att filer i mappen App_Data distribueras till/tas bort från Azure App Service.


AdditionalArguments - Additional arguments
string. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: -retryAttempts:6 -retryInterval:10000.

Ytterligare argument för webbdistribution efter syntaxen -key:value. Dessa tillämpas när du distribuerar Azure App Service. Exempel: -disableLink:AppPoolExtension -disableLink:ContentExtension. Läs mer om inställningar för webbdistributionsåtgärd.


AdditionalArguments - Additional arguments
string. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: -retryAttempts:6 -retryInterval:10000.

Ytterligare argument för webbdistribution efter syntaxen -key:value. Dessa tillämpas när du distribuerar Azure App Service. Exempel: -disableLink:AppPoolExtension -disableLink:ContentExtension. Läs mer om inställningar för webbdistributionsåtgärd.


RenameFilesFlag - Byt namn på låsta filer
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange standardvärdet för att aktivera flaggan msdeploy MSDEPLOY_RENAME_LOCKED_FILES=1 i Azure App Service-programinställningarna. Om alternativet anges kan msdeploy byta namn på filer som är låsta under appdistributionen.


RenameFilesFlag - Byt namn på låsta filer
boolean. Optional. Använd när UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Standardvärde: true.

Ange standardvärdet för att aktivera flaggan msdeploy MSDEPLOY_RENAME_LOCKED_FILES=1 i Azure App Service-programinställningarna. Om alternativet anges kan msdeploy byta namn på filer som är låsta under appdistributionen.


enableXmlTransform - XML transformation
Input alias: XmlTransformation. boolean. Optional. Använd när WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Standardvärde: false.

Konfigurationstransformeringarna körs för *.Release.config och *.<EnvironmentName>.config*.config file. Konfigurationstransformeringar körs före variabelersättning. XML transformations are supported only for the Windows platform.


enableXmlTransform - XML transformation
Input alias: XmlTransformation. boolean. Optional. Använd när WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Standardvärde: false.

Konfigurationstransformeringarna körs för *.Release.config och *.<EnvironmentName>.config*.config file. Konfigurationstransformeringar körs före variabelersättning. XML transformations are supported only for the Windows platform.


enableXmlVariableSubstitution - XML-variabelersättning
Input alias: XmlVariableSubstitution. boolean. Optional. Använd när WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Standardvärde: false.

Variabler som definierats i bygg- eller versionspipelinen matchas mot nyckel- eller namnposterna i configSections, appSettings, applicationSettingsoch connectionStrings avsnitt i alla konfigurationsfiler och parameters.xml fil. Variabelersättning körs efter konfigurationstransformeringar.

Om samma variabler definieras i versionspipelinen och i fasen ersätter scenvariablerna variablerna för versionspipelinen. Läs mer om [XML-variabelersättning]](/azure/devops/pipelines/tasks/transforms-variable-substitution#xml-variable-substitution).


enableXmlVariableSubstitution - XML-variabelersättning
Input alias: XmlVariableSubstitution. boolean. Optional. Använd när WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Standardvärde: false.

Variabler som definierats i bygg- eller versionspipelinen matchas mot nyckel- eller namnposterna i configSections, appSettings, applicationSettingsoch connectionStrings avsnitt i alla konfigurationsfiler och parameters.xml fil. Variabelersättning körs efter konfigurationstransformeringar.

Om samma variabler definieras i versionspipelinen och i fasen ersätter scenvariablerna variablerna för versionspipelinen. Läs mer om [XML-variabelersättning]](/azure/devops/pipelines/tasks/transforms-variable-substitution#xml-variable-substitution).


JSONFiles - JSON-variabelersättning
string. Optional. Använd när WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Innehåller en ny radavgränsad lista över JSON-filer som ersätter variabelvärdena. Filnamnen måste vara relativa till rotmappen. Om du vill ersätta JSON-variabler som är kapslade eller hierarkiska anger du dem med hjälp av JSONPath uttryck. Om du till exempel vill ersätta värdet för ConnectionString i exemplet nedan definierar du en variabel med namnet Data.DefaultConnection.ConnectionString i bygg- eller versionspipelinen (eller versionspipelines).

{
  "Data": {
    "DefaultConnection": {
      "ConnectionString": "Server=(localdb)\SQLEXPRESS;Database=MyDB;Trusted_Connection=True"
    }
  }
}

En variabelersättning körs efter konfigurationstransformeringar. Obs! Variabler för bygg- och versionspipeline undantas från ersättning. Läs mer om JSON-variabelersättning.


JSONFiles - JSON-variabelersättning
string. Optional. Använd när WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Innehåller en ny radavgränsad lista över JSON-filer som ersätter variabelvärdena. Filnamnen måste vara relativa till rotmappen. Om du vill ersätta JSON-variabler som är kapslade eller hierarkiska anger du dem med hjälp av JSONPath uttryck. Om du till exempel vill ersätta värdet för ConnectionString i exemplet nedan definierar du en variabel med namnet Data.DefaultConnection.ConnectionString i bygg- eller versionspipelinen (eller versionspipelines).

{
  "Data": {
    "DefaultConnection": {
      "ConnectionString": "Server=(localdb)\SQLEXPRESS;Database=MyDB;Trusted_Connection=True"
    }
  }
}

En variabelersättning körs efter konfigurationstransformeringar. Obs! Variabler för bygg- och versionspipeline undantas från ersättning. Läs mer om JSON-variabelersättning.


Alternativ för aktivitetskontroll

Alla aktiviteter har kontrollalternativ utöver sina uppgiftsindata. Mer information finns i Kontrollalternativ och vanliga uppgiftsegenskaper.

Output variables

This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.

AppServiceApplicationUrl
program-URL för den valda App Service.

Remarks

Använd den här uppgiften för att distribuera till en rad App Services i Azure. Uppgiften fungerar på plattformsoberoende agenter som kör Windows, Linux eller Mac och använder flera olika underliggande distributionstekniker.

The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and Node.js based web applications.

Uppgiften kan användas för att distribuera till en rad Azure App Services, till exempel:

Förutsättningar för uppgiften

Följande krav måste ställas in på måldatorerna för att aktiviteten ska fungera korrekt.

  • App Service-instans. Uppgiften används för att distribuera ett Web App-projekt eller Azure Function-projekt till en befintlig Azure App Service-instans, som måste finnas innan aktiviteten körs. The App Service instance can be created from the Azure portal and configured there. Alternativt kan Azure PowerShell-uppgift användas för att köra Azure PowerShell-skript för att etablera och konfigurera webbappen.

  • Azure Subscription. Om du vill distribuera till Azure måste en Azure-prenumeration vara länkad till pipelinen. Uppgiften fungerar inte med den klassiska Azure-tjänstanslutningen och de här anslutningarna visas inte i inställningarna för aktiviteten.

Usage notes

  • Uppgiften fungerar endast med Azure Resource Manager-API:er.
  • Om du vill ignorera SSL-fel definierar du en variabel med namnet VSTS_ARM_REST_IGNORE_SSL_ERRORS med värdet true i pipelinen. Om du distribuerar till ett fack som konfigurerats för automatisk växling misslyckas växlingen om du inte anger SCM_SKIP_SSL_VALIDATION eller SCM_SKIP_ASE_SSL_VALIDATION till 1 i konfigurationsinställningarna för App Services.
  • För .NET-appar som riktar sig mot webbappar i Windows undviker du distributionsfel med felet ERROR_FILE_IN_USE genom att se till att Byt namn på låsta filer och Ta appen offline inställningar är aktiverade. Använd alternativet fackväxling för distribution utan driftstopp.
  • När du distribuerar till en App Service som har Application Insights konfigurerat, och du har aktiverat Ta bort ytterligare filer vid mål, måste du även aktivera Exkludera filer från mappen App_Data för att upprätthålla Application Insights-tillägget i ett säkert tillstånd. Detta krävs eftersom Application Insights kontinuerliga webbjobb installeras i mappen App_Data.

Deployment methods

Det finns flera distributionsmetoder i den här uppgiften. Web Deploy (msdeploy.exe) är standard. Om du vill ändra distributionsalternativet expanderar du Ytterligare distributionsalternativ och aktiverar Välj distributionsmetod att välja mellan ytterligare paketbaserade distributionsalternativ.

Baserat på typen av Azure App Service och agent väljer uppgiften en lämplig distributionsteknik. De olika distributionstekniker som används av uppgiften är:

Som standard försöker uppgiften välja lämplig distributionsteknik baserat på indatapakettyp, App Service-typ och agentoperativsystem.

Logik för automatisk identifiering

För Windows-baserade agenter.

App Service-typ Package type Deployment Method
WebApp i Linux eller funktionsapp i Linux Folder/Zip/jar
War
zip distribuera
krig distribuera
WebApp för containrar (Linux) eller Funktionsapp för containrar (Linux) Uppdatera appinställningarna NA
WebApp i Windows, Funktionsapp i Windows, API App eller Mobilapp War
Jar
MsBuild-pakettyp eller distribuera till virtuellt program


Mapp/Zip
krig distribuera
zip distribuera
webb distribuera

if postDeploymentScript == true, Zip Deploy
else, Run From Package

På icke-Windows-agenter (för alla App Service-typer) förlitar sig uppgiften på Kudu REST-API:er för att distribuera appen.

Web Deploy

Web Deploy (msdeploy.exe) can be used to deploy a Web App on Windows or a Function App to the Azure App Service using a Windows agent. Web Deploy är funktionsrikt och erbjuder alternativ som:

  • Byt namn på låsta filer: Byt namn på alla filer som fortfarande används av webbservern genom att aktivera flaggan msdeploy MSDEPLOY\_RENAME\_LOCKED\_FILES=1 i Azure App Service-inställningarna. Om det här alternativet anges kan msdeploy byta namn på filer som är låsta under appdistributionen.

  • Ta bort ytterligare filer på målet: Tar bort filer i Azure App Service som inte har några matchande filer i App Service-artefaktpaketet eller mappen som distribueras.

  • Undanta filer från mappen App_Data: Förhindra att filer i mappen App_Data (i artefaktpaketet/mappen som distribueras) distribueras till Azure App Service

  • Ytterligare argument för webbdistribution: argument som ska användas när Azure App Service distribueras. Exempel: -disableLink:AppPoolExtension -disableLink:ContentExtension. Fler exempel på åtgärdsinställningar för webbdistribution finns i Inställningar för webbdistributionsåtgärd.

Installera Web Deploy på agenten från Web Deploy 3.6. Web Deploy 3.5 måste installeras utan det paketerade SQL-stödet. Du behöver inte välja några anpassade inställningar när du installerar Webbdistribution. Webbdistribution installeras på C:/Program Files (x86)/IIS/Microsoft Web Deploy V3.

Kudu REST-API:er

Kudu REST API:er fungerar på både Windows- och Linux-automationsagenter när målet är en webbapp i Windows, webbapp på Linux (inbyggd källa) eller funktionsapp. Uppgiften använder Kudu för att kopiera filer till Azure App Service.

Container Registry

Fungerar på både Windows- och Linux-automationsagenter när målet är en webbapp för containrar. Uppgiften uppdaterar appen genom att ange lämpligt containerregister, lagringsplats, avbildningsnamn och tagginformation. Du kan också använda uppgiften för att skicka ett startkommando för containeravbildningen.

Zip Deploy

Expects a .zip deployment package and deploys the file contents to the wwwroot folder of the App Service or Function App in Azure. This option overwrites all existing contents in the wwwroot folder. Mer information finns i Zip-distribution för Azure Functions.

Kör från paket

Förväntar sig samma distributionspaket som Zip Deploy. However, instead of deploying files to the wwwroot folder, the entire package is mounted by the Functions runtime and files in the wwwroot folder become read-only. Mer information finns i Kör Azure Functions från en paketfil.

War Deploy

Expects a .war deployment package and deploys the file content to the wwwroot folder or webapps folder of the App Service in Azure.

Troubleshooting

Jag kan inte webbdistribuera till min Azure App Service med hjälp av Microsoft Entra-ID-autentisering från min Windows-agent

Azure App Service-distributionsuppgiften stöder anslutning till Microsoft Azure med en ARM-tjänstanslutning med hjälp av Microsoft Entra-ID, såvida inte följande tre villkor finns:

  • Du använder paketformatet Web Deploy på en Windows-agent
  • Your agent is running with an older version of msdeploy.exe (for example when using the windows-2019 hosted agent image)
  • Grundläggande autentisering är inaktiverat för Din Azure App Service

Om dessa tre villkor finns får du ett fel som App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225.2108 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy.

För att lösa det här problemet kan du välja mellan följande alternativ i prioritetsordning.

  1. Uppdatera agentbilden. If you are using hosted agents, move from windows-2019 to windows-2022 (or windows-latest). If you are using self-hosted agents, install Visual Studio 2022 on the agent to get a newer version of msdeploy.exe.
  2. If you are dependent on an older agent image and can't update the agent for your pipeline, consider splitting the job so that the Azure App Service deploy task runs on windows-2022 (or windows-latest).
  3. Om inget av dessa alternativ är möjligt kan du aktivera grundläggande autentisering för din Azure App Service.

Fel: Det gick inte att hämta åtkomsttoken för Azure. Kontrollera om tjänstens huvudnamn som används är giltigt och inte har upphört att gälla.

Uppgiften använder tjänstens huvudnamn i tjänstanslutningen för att autentisera med Azure. Om tjänstens huvudnamn har upphört att gälla eller inte har behörighet till App Service misslyckas uppgiften med det här felet. Kontrollera giltigheten för tjänstens huvudnamn som används och att det finns i appregistreringen. Mer information finns i Använda rollbaserad åtkomstkontroll för att hantera åtkomst till dina Azure-prenumerationsresurser. Det här blogginlägget innehåller även mer information om hur du använder autentisering med tjänstens huvudnamn.

SSL error

Om du vill använda ett certifikat i App Service måste certifikatet signeras av en betrodd certifikatutfärdare. Om webbappen ger dig certifikatverifieringsfel använder du förmodligen ett självsignerat certifikat. Ange en variabel med namnet VSTS_ARM_REST_IGNORE_SSL_ERRORS till värdet true i bygg- eller versionspipelinen för att lösa felet.

En version låser sig under lång tid och misslyckas sedan

Det här problemet kan bero på otillräcklig kapacitet i Din App Service-plan. För att lösa det här problemet kan du skala upp App Service-instansen för att öka tillgängligt processor-, RAM-minne- och diskutrymme eller prova med en annan App Service-plan.

5xx error codes

If you're seeing a 5xx error, check the status of your Azure service.

Azure-funktionen slutade plötsligt fungera

Azure Functions kan plötsligt sluta fungera om mer än ett år har passerat sedan den senaste distributionen. Om du distribuerar med "RunFromPackage" i "deploymentMethod" genereras en SAS med ett förfallodatum på 1 år och anges som värdet "WEBSITE_RUN_FROM_PACKAGE" i programkonfigurationen. Azure Functions använder denna SAS för att referera till paketfilen för funktionskörning, så om SAS har upphört att gälla körs inte funktionen. Lös problemet genom att distribuera igen för att generera en SAS med ett förfallodatum på ett år.

Fel: Inget paket hittades med angivet mönster

Kontrollera om paketet som nämns i uppgiften publiceras som en artefakt i bygget eller i en tidigare fas och laddas ned i det aktuella jobbet.

Fel: Alternativet Publicera med zip-distribution stöds inte för msBuild-pakettypen

Webbpaket som skapats via MSBuild-aktiviteten (med standardargument) har en kapslad mappstruktur som endast kan distribueras korrekt av Web Deploy. Distributionsalternativet publish-to-zip kan inte användas för att distribuera dessa paket. Utför följande steg för att konvertera paketeringsstrukturen:

  1. In the Build solution task, change the MSBuild Arguments to /p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:publishUrl="$(System.DefaultWorkingDirectory)\\WebAppContent":

    Skärmbild som visar värdena för Build-lösningen.

  2. Lägg till en arkivaktivitet och ändra värdena enligt följande:

    1. Ändra rotmapp eller fil för att arkivera till $(System.DefaultWorkingDirectory)\\WebAppContent.

    2. Avmarkera kryssrutan Prepend-rotmappnamn för arkivsökvägar:

      Skärmbild som visar arkivvärdena.

Distributionen av webbappar i Windows lyckas men appen fungerar inte

Det kan bero på att web.config inte finns i din app. Du kan antingen lägga till en web.config fil i källan eller generera en automatiskt med hjälp av filtransformeringar och alternativ för variabelersättning för uppgiften.

  • Klicka på uppgiften och gå till Generera web.config parametrar för Python, Node.js, Go och Java-appar.

    Skärmbild av dialogrutan Generera web.config parametrar.

  • Klicka på knappen Mer generera web.config parametrar för Python, Node.js, Go och Java-appar för att redigera parametrarna.

    Skärmbild av listrutan Application Framework.

  • Välj din programtyp i listrutan.

  • Klicka på OK. Detta fyller i web.config parametrar som krävs för att generera web.config.

Note

This section is deprecated and has been replaced with the File Transform task.

ERROR_FILE_IN_USE

When deploying .NET apps to Web App on Windows, deployment may fail with error code ERROR_FILE_IN_USE. Lös felet genom att se till att Byt namn på låsta filer och Ta appen offline alternativ är aktiverade i aktiviteten. Använd fackväxling för noll driftstoppsdistributioner.

Du kan också använda distributionsmetoden Kör från paket för att undvika resurslåsning.

Fel vid webbdistribution

Om du använder webbdistribution för att distribuera din app visar Webbdistribution i vissa felscenarier en felkod i loggen. Information om hur du felsöker ett webbdistributionsfel finns i Felkoder för webbdistribution.

Distributionen av webbappar i App Service Environment (ASE) fungerar inte

  • Se till att Azure DevOps-byggagenten finns på samma virtuella nätverk (undernätet kan vara annorlunda) som den interna lastbalanseraren (ILB) för ASE. Detta gör att agenten kan hämta kod från Azure DevOps och distribuera till ASE.
  • Om du använder Azure DevOps behöver agenten inte vara tillgänglig från Internet, men behöver bara utgående åtkomst för att ansluta till Azure DevOps Service.
  • Om du använder TFS/Azure DevOps Server som distribuerats i ett virtuellt nätverk kan agenten isoleras helt.
  • Byggagenten måste konfigureras med DNS-konfigurationen för den webbapp som den behöver distribueras till. Eftersom de privata resurserna i det virtuella nätverket inte har poster i Azure DNS måste detta läggas till i värdfilen på agentdatorn.
  • Om ett självsignerat certifikat används för ASE-konfigurationen måste alternativet -allowUntrusted anges i distributionsuppgiften för MSDeploy. Vi rekommenderar också att du anger variabeln VSTS_ARM_REST_IGNORE_SSL_ERRORS till true. Om ett certifikat från en certifikatutfärdare används för ASE-konfiguration bör detta inte vara nödvändigt. Om du distribuerar till ett fack som konfigurerats för automatisk växling misslyckas växlingen om du inte anger SCM_SKIP_SSL_VALIDATION eller SCM_SKIP_ASE_SSL_VALIDATION till 1 i konfigurationsinställningarna för App Services.

FAQs

Vad är skillnaden mellan AzureWebApp och AzureRmWebAppDeployment uppgifter?

Uppgiften Azure Web App (AzureWebApp) är det enklaste sättet att distribuera till en Azure-webbapp. Som standard sker distributionen till rotprogrammet i Azure-webbappen.

Uppgiften Azure App Service Deploy (AzureRmWebAppDeployment) kan hantera fler anpassade scenarier, till exempel:

Note

Filtransformeringar och variabelersättning stöds också av den separata filtransformeringsaktiviteten för användning i Azure Pipelines. Du kan använda filtransformeringsaktiviteten för att tillämpa filtransformeringar och variabelersättningar på alla konfigurations- och parameterfiler.

Hur ska jag konfigurera min tjänstanslutning?

Den här uppgiften kräver en Azure Resource Manager-tjänstanslutning.

Hur ska jag konfigurera distribution av webbjobb med Application Insights?

When you're deploying to an App Service, if you have Application Insights configured and you've enabled Remove additional files at destination, you also need to enable Exclude files from the App_Data folder. Om du aktiverar det här alternativet hålls Application Insights-tillägget i ett säkert tillstånd. Det här steget krävs eftersom Application Insights kontinuerliga webbjobb är installerat i mappen App_Data.

Hur ska jag konfigurera min agent om den finns bakom en proxy när jag distribuerar till App Service?

Om din lokala agent kräver en webbproxy kan du informera agenten om proxyn under konfigurationen. På så sätt kan din agent ansluta till Azure Pipelines eller Azure DevOps Server via proxyn. Läs mer om att köra en lokalt installerad agent bakom en webbproxy.

Examples

Distribuera till specifik apptyp

Om du vill distribuera till en viss apptyp anger du appType till något av följande godkända värden: webApp (webbapp i Windows), webAppLinux (webbapp på Linux), webAppContainer (Web App for Containers – Linux), functionApp (funktionsapp i Windows), functionAppLinux (funktionsapp på Linux), functionAppContainer (funktionsapp för containrar – Linux), apiApp (API-app), mobileApp (mobilapp). Om det inte anges tas webApp som standardvärde.

Om du vill aktivera avancerade distributionsalternativ lägger du till parametern enableCustomDeployment: true och inkluderar följande parametrar efter behov.

# deploymentMethod: 'runFromPackage' # supports zipDeploy as well
    # appOffline: boolean    # Not applicable for 'runFromPackage'
    # setParametersFile: string
    # removeAdditionalFilesFlag: boolean
    # additionalArguments: string

Distribuera till Azure Web App Linux-container

Följande YAML-exempel distribueras till en Azure Web App-container (Linux).

pool:
  vmImage: ubuntu-latest

variables:
  azureSubscriptionEndpoint: Contoso
  DockerNamespace: contoso.azurecr.io
  DockerRepository: aspnetcore
  WebAppName: containersdemoapp

steps:

- task: AzureRMWebAppDeployment@4
  displayName: Azure App Service Deploy
  inputs:
    appType: webAppContainer
    ConnectedServiceName: $(azureSubscriptionEndpoint)
    WebAppName: $(WebAppName)
    DockerNamespace: $(DockerNamespace)
    DockerRepository: $(DockerRepository)
    DockerImageTag: $(Build.BuildId)

Distribuera en webbapp till en Windows App Service mellan distributionsplatser

I följande exempel distribueras en webbapp till en Windows App Service på flera distributionsplatser.

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

stages:
 - stage: DeployDevStage
    displayName: 'Deploy App to Dev Slot'
    jobs:
      - job:  DeployApp
        displayName: 'Deploy App'
        steps:
        - task: DownloadPipelineArtifact@2
          inputs:
            buildType: 'current'
            artifactName: 'drop'
            targetPath: '$(System.DefaultWorkingDirectory)'
        - task: AzureRmWebAppDeployment@4
          inputs:
            ConnectionType: 'AzureRM'
            azureSubscription: 'Fabrikam Azure Subscription - PartsUnlimited'
            appType: 'webApp'
            WebAppName: 'partsunlimited'
            deployToSlotOrASE: true
            ResourceGroupName: 'rgPartsUnlimited'
            SlotName: 'Dev'
            packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip'

  - stage: DeployStagingStage
    displayName: 'Deploy App to Staging Slot'
    dependsOn: DeployDevStage
    jobs:
      - job:  DeployApp
        displayName: 'Deploy App'
        steps:
        - task: DownloadPipelineArtifact@2
          inputs:
            buildType: 'current'
            artifactName: 'drop'
            targetPath: '$(System.DefaultWorkingDirectory)'
        - task: AzureRmWebAppDeployment@4
          inputs:
            appType: webApp
            ConnectionType: AzureRM            
            ConnectedServiceName: 'Fabrikam Azure Subscription - PartsUnlimited'
            ResourceGroupName: 'rgPartsUnlimited'
            WebAppName: 'partsunlimited'
            Package: '$(System.DefaultWorkingDirectory)/**/*.zip'
            deployToSlotOrASE: true
            SlotName: 'staging'

Exempel på postdistributionsskript

Uppgiften ger ett alternativ för att anpassa distributionen genom att tillhandahålla ett skript som ska köras på Azure App Service efter att appens artefakter har kopierats till App Service. Du kan välja att ange antingen ett infogat distributionsskript eller sökvägen och namnet på en skriptfil i artefaktmappen.

Detta är mycket användbart när du vill återställa programberoenden direkt i App Service. Om du återställer paket för Node-, PHP- och Python-appar kan du undvika tidsgränser när programberoendet resulterar i att en stor artefakt kopieras över från agenten till Azure App Service.

Ett exempel på ett distributionsskript är:

@echo off
if NOT exist requirements.txt (
 echo No Requirements.txt found.
 EXIT /b 0
)
if NOT exist "$(PYTHON_EXT)/python.exe" (
 echo Python extension not available >&2
 EXIT /b 1
)
echo Installing dependencies
call "$(PYTHON_EXT)/python.exe" -m pip install -U setuptools
if %errorlevel% NEQ 0 (
 echo Failed to install setuptools >&2
 EXIT /b 1
)
call "$(PYTHON_EXT)/python.exe" -m pip install -r requirements.txt
if %errorlevel% NEQ 0 (
 echo Failed to install dependencies>&2
 EXIT /b 1
)

Requirements

Requirement Description
Pipeline types YAML, klassisk version, klassisk version
Runs on Agent, DeploymentGroup
Demands None
Capabilities Den här aktiviteten uppfyller inte några krav på efterföljande uppgifter i jobbet.
Command restrictions Any
Settable variables Any
Agent version 2.104.1 eller senare
Task category Deploy

See also

  • This task is open source on GitHub. Feedback och bidrag är välkomna.