AzureRmWebAppDeployment@4: Azure App Service tarea implementar v4

Use esta tarea para implementar en Azure App Service una aplicación web, móvil o de API mediante Docker, Java, .NET, .NET Core, Node.js, PHP, Python o Ruby.

Nota

Use AzureFunctionApp@1 para implementar aplicaciones Azure Functions.

Actualice App de Azure Services en Windows, Web App en Linux con imágenes integradas o contenedores de Docker, ASP.NET, .NET Core, PHP, Python o aplicaciones web basadas en Node.js, Aplicaciones de funciones en Windows o Linux con contenedores de Docker, Mobile Apps, aplicaciones de API y trabajos web mediante las API REST de Web Deploy/Kudu.

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' | '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.
# Azure App Service Deploy v4
# Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps on Windows or Linux with Docker Containers, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs.
- 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. 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.

Entradas

ConnectionType - Tipo de conexión
string. Obligatorio. Valores permitidos: AzureRM (Azure Resource Manager), PublishProfile (Perfil de publicación). Valor predeterminado: AzureRM.

Especifique el tipo de conexión de servicio que se usará para implementar la aplicación web.

Especifique Publish Profile para usar perfiles de publicación creados de Visual Studio.


ConnectionType - Tipo de conexión
string. Obligatorio. Valores permitidos: AzureRM (Azure Resource Manager), PublishProfile (Perfil de publicación). Valor predeterminado: AzureRM.

Especifique el tipo de conexión de servicio que se usará para implementar la aplicación web.


azureSubscription - Suscripción de Azure
Alias de entrada: ConnectedServiceName. string. Necesario cuando ConnectionType = AzureRM.

Especifique la suscripción de Azure Resource Manager para la implementación.


PublishProfilePath - Ruta de acceso del perfil de publicación
string. Necesario cuando ConnectionType = PublishProfile. Valor predeterminado: $(System.DefaultWorkingDirectory)/**/*.pubxml.

Ruta de acceso del perfil de publicación creado a partir de Visual Studio.


PublishProfilePassword - Publicar contraseña de perfil
string. Necesario cuando ConnectionType = PublishProfile.

Se recomienda almacenar una contraseña en una variable secreta y usar esa variable aquí, por ejemplo, $(Password).


appType - tipo de App Service
Alias de entrada: WebAppKind. string. Necesario cuando ConnectionType = AzureRM. Valores permitidos: webApp (Web App en Windows), webAppLinux (Web App en Linux), webAppContainer (Web App for Containers (Linux)), webAppHyperVContainer (Web App for Containers (Windows)), functionApp (Aplicación de funciones en Windows (no recomendado, Usar Azure Functions tarea)), functionAppLinux (Aplicación de funciones en Linux (no recomendado, Usar Azure Functions tarea)), functionAppContainer (Aplicación de funciones para contenedores (Linux) (no recomendado, Usar Azure Functions para la tarea de contenedor)), apiApp (aplicación de API), mobileApp (aplicación móvil). Valor predeterminado: webApp.

Elija entre Aplicación web en Windows, Aplicación web en Linux, Aplicación web para contenedores, Aplicación de funciones, Aplicación de funciones en Linux, Aplicación de funciones para contenedores y Aplicación móvil.


appType - tipo de App Service
Alias de entrada: WebAppKind. string. Necesario cuando ConnectionType = AzureRM. Valores permitidos: webApp (Web App en Windows), webAppLinux (Web App en Linux), webAppContainer (Web App for Containers (Linux)), (Function App en Windows), functionAppfunctionAppLinux (Function App en Linux), functionAppContainer (Function App for Containers (Linux)), apiApp (API App), mobileApp (Aplicación móvil). Valor predeterminado: webApp.

Elija entre Aplicación web en Windows, Aplicación web en Linux, Aplicación web para contenedores, Aplicación de funciones, Aplicación de funciones en Linux, Aplicación de funciones para contenedores y Aplicación móvil.


WebAppName - nombre de App Service
string. Necesario cuando ConnectionType = AzureRM.

Especifique el nombre de un Azure App Service existente. Los servicios de aplicaciones basados en el tipo de aplicación seleccionado solo se mostrarán al usar la tarea asistente.


deployToSlotOrASE - Implementación en ranura o App Service Environment
Alias de entrada: DeployToSlotOrASEFlag. boolean. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != "". Valor predeterminado: false.

Especifique la opción para implementar en una ranura de implementación existente o en un entorno de Azure App Service. Para ambos destinos, la tarea requiere un nombre de grupo de recursos. Si el destino de implementación es una ranura, de forma predeterminada, la implementación es en la ranura producción . Se puede proporcionar cualquier otro nombre a la ranura existente. Si el destino de implementación es un entorno de Azure App Service, deje el nombre de la ranura como Production y especifique solo el nombre del grupo de recursos.


ResourceGroupName - Grupo de recursos
string. Necesario cuando DeployToSlotOrASEFlag = true.

El nombre del grupo de recursos es necesario cuando el destino de implementación es una ranura de implementación o un App Service Environment.

Especifique el grupo de recursos de Azure que contiene el Azure App Service especificado anteriormente.


SlotName - Ranura
string. Necesario cuando DeployToSlotOrASEFlag = true. Valor predeterminado: production.

Especifique una ranura existente distinta de la ranura producción.


DockerNamespace - Registro o espacio de nombres
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Un nombre de dominio de nivel superior único global para su registro o espacio de nombres específico. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerNamespace - Registro o espacio de nombres
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Un nombre de dominio de nivel superior único global para su registro o espacio de nombres específico. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerNamespace - Registro o espacio de nombres
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Un nombre de dominio de nivel superior único global para su registro o espacio de nombres específico. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerRepository - Imagen
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerRepository - Imagen
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerRepository - Imagen
string. Necesario cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerImageTag - Etiqueta
string. Opcional. Use cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer.

Las etiquetas son el mecanismo que usan los registros para aplicar información de versión a las imágenes de Docker. Nota: El nombre completo de la imagen será del formato: {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerImageTag - Etiqueta
string. Opcional. Use cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer.

Las etiquetas son el mecanismo que usan los registros para aplicar información de versión a las imágenes de Docker. Nota: El nombre completo de la imagen tendrá el formato : {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


DockerImageTag - Etiqueta
string. Opcional. Use cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Las etiquetas son el mecanismo que usan los registros para aplicar información de versión a las imágenes de Docker. Nota: El nombre completo de la imagen tendrá el formato : {registry or namespace}/{repository}:{tag}. Por ejemplo, myregistry.azurecr.io/nginx:latest.


VirtualApplication - Aplicación virtual
string. Opcional. Use cuando WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "".

Especifique el nombre de la aplicación virtual que se ha configurado en el Azure Portal. Esta opción no es necesaria para las implementaciones en la raíz del sitio web. La aplicación virtual debe haberse configurado antes de la implementación del proyecto web.


VirtualApplication - Aplicación virtual
string. Opcional. Use cuando WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != functionApp && webAppKind != functionAppLinux && WebAppKind != "".

Especifique el nombre de la aplicación virtual que se ha configurado en el Azure Portal. Esta opción no es necesaria para las implementaciones en la raíz del sitio web. La aplicación virtual debe haberse configurado antes de la implementación del proyecto web.


packageForLinux - Paquete o carpeta
Alias de entrada: Package. string. Necesario cuando ConnectionType = PublishProfile || WebAppKind = webApp || WebAppKind = apiApp || WebAppKind = functionApp || WebAppKind = mobileApp || WebAppKind = webAppLinux || webAppKind = functionAppLinux. Valor predeterminado: $(System.DefaultWorkingDirectory)/**/*.zip.

Ruta de acceso del archivo al paquete o a una carpeta que contiene el contenido de App Service generado por MSBuild o un archivo zip o war comprimido.

Las variables son Build y Release. Se admiten caracteres comodín.

Por ejemplo, $(System.DefaultWorkingDirectory)/\*\*/\*.zip o $(System.DefaultWorkingDirectory)/\*\*/\*.war.


RuntimeStack - Pila en tiempo de ejecución
string. Opcional. Use cuando WebAppKind = webAppLinux.

Especifique el marco y la versión de Function App en Linux.


RuntimeStackFunction - Pila en tiempo de ejecución
string. Opcional. Use cuando WebAppKind = functionAppLinux. Valores permitidos: 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 v)2/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)).

Especifique el marco y la versión. Consulte la información general sobre las versiones del entorno de ejecución de Azure Functions para ver las versiones admitidas del entorno de ejecución. Los valores antiguos como DOCKER|microsoft/azure-functions-* están en desuso. Use los nuevos valores de la lista desplegable.


RuntimeStackFunction - Pila en tiempo de ejecución
string. Opcional. Use cuando WebAppKind = functionAppLinux. Valores permitidos: DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0 (.NET), DOCKER|microsoft/azure-functions-node8:2.0 (JavaScript).

Especifique el marco y la versión.


StartupCommand - Comando de inicio
string. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppKind = webAppHyperVContainer.

Especifique el comando Startup. Por ejemplo:

dotnet exec filename.dll

dotnet filename.dll.


StartupCommand - Comando de inicio
string. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux || WebAppkind = webAppHyperVContainer.

Especifique el comando Startup. Por ejemplo:

dotnet exec filename.dll

dotnet filename.dll.


StartupCommand - Comando de inicio
string. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux.

Especifique el comando Startup. Por ejemplo:

dotnet exec filename.dll

dotnet filename.dll.


StartupCommand - Comando de inicio
string. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux.

Especifique el comando Startup. Por ejemplo, dotnet rundotnet filename.dll.


StartupCommand - Comando de inicio
string. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer.

Especifique el comando Startup.


ScriptType - Tipo de script de implementación
string. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Valores permitidos: Inline Script, File Path (Ruta de acceso del archivo de script).

Personaliza la implementación proporcionando un script que se ejecuta en el Azure App Service después de una implementación correcta. Elija el script de implementación insertado o la ruta de acceso y el nombre de un archivo de script. Obtenga más información sobre la implementación de Azure App Service.


ScriptType - Tipo de script de implementación
string. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Valores permitidos: Inline Script, File Path (Ruta de acceso del archivo de script).

Personaliza la implementación proporcionando un script que se ejecuta en el Azure App Service después de una implementación correcta. Elija el script de implementación insertado o la ruta de acceso y el nombre de un archivo de script. Obtenga más información sobre la implementación de Azure App Service.


InlineScript - Script insertado
string. Necesario cuando ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer. Valor predeterminado: :: You can provide your deployment commands here. One command per line..

El script que se va a ejecutar. Puede proporcionar los comandos de implementación aquí, uno por línea. Consulte el ejemplo siguiente.


InlineScript - Script insertado
string. Necesario cuando ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer. Valor predeterminado: :: You can provide your deployment commands here. One command per line..

El script que se va a ejecutar. Puede proporcionar los comandos de implementación aquí, uno por línea. Consulte el ejemplo siguiente.


ScriptPath - Ruta de acceso del script de implementación
string. Necesario cuando ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer.

Ruta de acceso y nombre del script que se va a ejecutar.


ScriptPath - Ruta de acceso del script de implementación
string. Necesario cuando ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer.

Ruta de acceso y nombre del script que se va a ejecutar.


WebConfigParameters - Generación de parámetros web.config para aplicaciones python, Node.js, Go y Java
string. Opcional. Use cuando WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Se generará e implementará un estándar Web.config en Azure App Service si la aplicación no tiene una. Los valores de web.config se pueden editar y variar en función del marco de trabajo de la aplicación. Por ejemplo, para node.js las aplicaciones, web.config tendrá un archivo de inicio y iis_node valores de módulo. Esta característica de edición solo es para el objeto generado web.config. Obtenga más información sobre la implementación de Azure App Service.


WebConfigParameters - Generación de parámetros web.config para aplicaciones python, Node.js, Go y Java
string. Opcional. Use cuando WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Se generará e implementará un estándar Web.config en Azure App Service si la aplicación no tiene una. Los valores de web.config se pueden editar y variar en función del marco de trabajo de la aplicación. Por ejemplo, para node.js las aplicaciones, web.config tendrá un archivo de inicio y iis_node valores de módulo. Esta característica de edición solo es para el objeto generado web.config. Obtenga más información sobre la implementación de Azure App Service.


AppSettings - Configuración de la aplicación
string. Opcional. Use cuando ConnectionType = AzureRM.

Edita la configuración de la aplicación web mediante la sintaxis -key value. Los valores que contienen espacios deben ir entre comillas dobles. Ejemplos: -Port 5000 -RequestTimeout 5000 y -WEBSITE_TIME_ZONE "Eastern Standard Time". Para proporcionar dos o más valores clave, los valores clave deben estar separados por un espacio. Ejemplo: -key1 "Value1" -Key2 "Value2".


ConfigurationSettings - Configuración
string. Opcional. Use cuando ConnectionType = AzureRM.

Edita las opciones de configuración de la aplicación web mediante la sintaxis -key value. Los valores que contienen espacios deben ir entre comillas dobles. Ejemplo: -phpVersion 5.6 -linuxFxVersion node|6.11.


enableCustomDeployment - Selección del método de implementación
Alias de entrada: UseWebDeploy. boolean. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: false.

Si se desactiva o false, la tarea detecta automáticamente el mejor método de implementación en función del tipo de aplicación, el formato de paquete y otros parámetros. Active esta opción en la tarea asistente para ver los métodos de implementación admitidos y elija una para implementar la aplicación.


enableCustomDeployment - Selección del método de implementación
Alias de entrada: UseWebDeploy. boolean. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: false.

Si se desactiva o false, la tarea detecta automáticamente el mejor método de implementación en función del tipo de aplicación, el formato de paquete y otros parámetros. Active esta opción en la tarea asistente para ver los métodos de implementación admitidos y elija una para implementar la aplicación.


DeploymentType - Método de implementación
string. Necesario cuando UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valores permitidos: webDeploy (Web Deploy), zipDeploy (Zip Deploy), runFromZip (Ejecutar desde paquete). Valor predeterminado: webDeploy.

Determina el método de implementación de la aplicación.


DeploymentType - Método de implementación
string. Necesario cuando UseWebDeploy == true && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valores permitidos: webDeploy (Web Deploy), zipDeploy (Zip Deploy), runFromZip (Ejecutar desde paquete). Valor predeterminado: webDeploy.

Determina el método de implementación de la aplicación.


TakeAppOfflineFlag - Desconectar la aplicación
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique esta opción para desconectar el Azure App Service colocando un app_offline.htm archivo en el directorio raíz antes de que comience la operación de sincronización. El archivo se quitará después de que la sincronización se complete correctamente.


TakeAppOfflineFlag - Desconectar la aplicación
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType != runFromZip && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique esta opción para desconectar el Azure App Service colocando un app_offline.htm archivo en el directorio raíz antes de que comience la operación de sincronización. El archivo se quitará después de que la sincronización se complete correctamente.


SetParametersFile - Archivo SetParameters
string. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar.

Ubicación del SetParameters.xml archivo que se va a usar.


SetParametersFile - Archivo SetParameters
string. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar.

Ubicación del SetParameters.xml archivo que se va a usar.


RemoveAdditionalFilesFlag - Eliminación de archivos adicionales en el destino
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: false.

Especifique "true" para eliminar archivos en el Azure App Service que no tengan archivos coincidentes en el paquete o la carpeta App Service. También quitará todos los archivos relacionados con cualquier extensión instalada en este Azure App Service. Para evitar esto, active la Exclude files from App_Data folder casilla.


RemoveAdditionalFilesFlag - Eliminación de archivos adicionales en el destino
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: false.

Especifique "true" para eliminar archivos en el Azure App Service que no tengan archivos coincidentes en el paquete o la carpeta App Service. También quitará todos los archivos relacionados con cualquier extensión instalada en este Azure App Service. Para evitar esto, active la Exclude files from App_Data folder casilla.


ExcludeFilesFromAppDataFlag - Excluir archivos de la carpeta App_Data
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique la opción para evitar que los archivos de la App_Data carpeta se implementen o eliminen de la Azure App Service.


ExcludeFilesFromAppDataFlag - Excluir archivos de la carpeta App_Data
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique la opción para evitar que los archivos de la App_Data carpeta se implementen o eliminen de la Azure App Service.


AdditionalArguments - Argumentos adicionales
string. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: -retryAttempts:6 -retryInterval:10000.

Argumentos adicionales de Web Deploy después de la sintaxis -key:value. Se aplicarán al implementar Azure App Service. Ejemplos: -disableLink:AppPoolExtension -disableLink:ContentExtension. Obtenga más información sobre la configuración de la operación de implementación web.


AdditionalArguments - Argumentos adicionales
string. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: -retryAttempts:6 -retryInterval:10000.

Argumentos adicionales de Web Deploy después de la sintaxis -key:value. Se aplicarán al implementar Azure App Service. Ejemplos: -disableLink:AppPoolExtension -disableLink:ContentExtension. Obtenga más información sobre la configuración de la operación de implementación web.


RenameFilesFlag - Cambiar el nombre de los archivos bloqueados
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique el valor predeterminado para habilitar la marca MSDEPLOY_RENAME_LOCKED_FILES=1 msdeploy en Azure App Service configuración de la aplicación. Si se establece, la opción permite a msdeploy cambiar el nombre de los archivos bloqueados durante la implementación de la aplicación.


RenameFilesFlag - Cambiar el nombre de los archivos bloqueados
boolean. Opcional. Use cuando UseWebDeploy == true && DeploymentType == webDeploy && ConnectionType = AzureRM && WebAppKind != webAppLinux && WebAppKind != webAppContainer && WebAppkind != functionAppContainer && webAppKind != functionAppLinux && WebAppKind != "" && Package NotEndsWith .war && Package NotEndsWith .jar. Valor predeterminado: true.

Especifique el valor predeterminado para habilitar la marca MSDEPLOY_RENAME_LOCKED_FILES=1 msdeploy en Azure App Service configuración de la aplicación. Si se establece, la opción permite a msdeploy cambiar el nombre de los archivos bloqueados durante la implementación de la aplicación.


enableXmlTransform - Transformación XML
Alias de entrada: XmlTransformation. boolean. Opcional. Use cuando WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Valor predeterminado: false.

Las transformaciones de configuración se ejecutarán para *.Release.config y *.<EnvironmentName>.config en .*.config file Las transformaciones de configuración se ejecutan antes de la sustitución de variables. Las transformaciones XML solo se admiten para la plataforma Windows.


enableXmlTransform - Transformación XML
Alias de entrada: XmlTransformation. boolean. Opcional. Use cuando WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Valor predeterminado: false.

Las transformaciones de configuración se ejecutarán para *.Release.config y *.<EnvironmentName>.config en .*.config file Las transformaciones de configuración se ejecutan antes de la sustitución de variables. Las transformaciones XML solo se admiten para la plataforma Windows.


enableXmlVariableSubstitution - Sustitución de variables XML
Alias de entrada: XmlVariableSubstitution. boolean. Opcional. Use cuando WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Valor predeterminado: false.

Las variables definidas en la canalización de compilación o versión coincidirán con las entradas de clave o nombre de las configSectionssecciones , appSettings, applicationSettingsy connectionStrings de cualquier archivo de configuración y parameters.xml archivo. La sustitución de variables se ejecuta después de las transformaciones de configuración.

Si las mismas variables se definen en la canalización de versión y en la fase, las variables de fase reemplazarán las variables de canalización de versión. Obtenga más información sobre [sustitución de variables XML]](/azure/devops/pipelines/tasks/transforms-variable-substitution#xml-variable-substitution).


enableXmlVariableSubstitution - Sustitución de variables XML
Alias de entrada: XmlVariableSubstitution. boolean. Opcional. Use cuando WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war. Valor predeterminado: false.

Las variables definidas en la canalización de compilación o versión coincidirán con las entradas de clave o nombre de las configSectionssecciones , appSettings, applicationSettingsy connectionStrings de cualquier archivo de configuración y parameters.xml archivo. La sustitución de variables se ejecuta después de las transformaciones de configuración.

Si las mismas variables se definen en la canalización de versión y en la fase, las variables de fase reemplazarán las variables de canalización de versión. Obtenga más información sobre [sustitución de variables XML]](/azure/devops/pipelines/tasks/transforms-variable-substitution#xml-variable-substitution).


JSONFiles - Sustitución de variables JSON
string. Opcional. Use cuando WebAppKind != webAppContainer && WebAppKind != webAppHyperVContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Proporciona una nueva lista separada por líneas de archivos JSON para sustituir los valores de variable. Los nombres de archivo deben ser relativos a la carpeta raíz. Para sustituir variables JSON anidadas o jerárquicas, especifíquelas mediante JSONPath expresiones. Por ejemplo, para reemplazar el valor de ConnectionString en el ejemplo siguiente, defina una variable denominada Data.DefaultConnection.ConnectionString en la canalización de compilación o versión (o fase de canalizaciones de versión).

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

Una sustitución de variables se ejecuta después de las transformaciones de configuración. Nota: Las variables de canalización de compilación y versión se excluyen de la sustitución. Obtenga más información sobre la sustitución de variables JSON.


JSONFiles - Sustitución de variables JSON
string. Opcional. Use cuando WebAppKind != webAppContainer && WebAppkind != functionAppContainer && WebAppKind != webAppLinux && webAppKind != functionAppLinux && Package NotEndsWith .war.

Proporciona una nueva lista separada por líneas de archivos JSON para sustituir los valores de variable. Los nombres de archivo deben ser relativos a la carpeta raíz. Para sustituir variables JSON anidadas o jerárquicas, especifíquelas mediante JSONPath expresiones. Por ejemplo, para reemplazar el valor de ConnectionString en el ejemplo siguiente, defina una variable denominada Data.DefaultConnection.ConnectionString en la canalización de compilación o versión (o fase de canalizaciones de versión).

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

Una sustitución de variables se ejecuta después de las transformaciones de configuración. Nota: Las variables de canalización de compilación y versión se excluyen de la sustitución. Obtenga más información sobre la sustitución de variables JSON.


Opciones de control de tareas

Todas las tareas tienen opciones de control además de las entradas de tareas. Para obtener más información, vea Opciones de control y propiedades de tareas comunes.

Variables de salida

Esta tarea define las siguientes variables de salida, que puede consumir en pasos, trabajos y fases de bajada.

AppServiceApplicationUrl
Dirección URL de la aplicación del App Service seleccionado.

Comentarios

Use esta tarea para implementar en una variedad de servicios de App Services en Azure. La tarea funciona en agentes multiplataforma que ejecutan Windows, Linux o Mac y usa varias tecnologías de implementación subyacentes diferentes.

La tarea funciona en las aplicaciones web basadas en ASP.NET, ASP.NET Core, PHP, Java, Python, Go y Node.js.

La tarea se puede usar para implementar en una variedad de Azure App Services, como:

Requisitos previos para la tarea

Los siguientes requisitos previos deben configurarse en los equipos de destino para que la tarea funcione correctamente.

  • Instancia de App Service. La tarea se usa para implementar un proyecto de aplicación web o un proyecto de función de Azure en una instancia de Azure App Service existente, que debe existir antes de que se ejecute la tarea. La instancia de App Service se puede crear a partir del Azure Portal y configurarla ahí. Como alternativa, se puede usar la tarea Azure PowerShell para ejecutar scripts de PowerShell de AzureRM para aprovisionar y configurar la aplicación web.

  • Suscripción a Azure. Para realizar la implementación en Azure, se debe vincular una suscripción de Azure a la canalización. La tarea no funciona con la conexión de servicio de Azure clásica y no enumerará estas conexiones en la configuración de la tarea.

Notas de uso

  • La tarea solo funciona con las API de Azure Resource Manager.
  • Para omitir los errores de SSL, defina una variable denominada VSTS_ARM_REST_IGNORE_SSL_ERRORS con el valor true en la canalización. Si va a implementar en una ranura configurada para el intercambio automático, se producirá un error en el intercambio a menos que establezca SCM_SKIP_SSL_VALIDATION o SCM_SKIP_ASE_SSL_VALIDATION en 1 en los valores de configuración de App Services.
  • En el caso de las aplicaciones .NET destinadas a aplicaciones web en Windows, evite el error ERROR_FILE_IN_USE de implementación asegurándose de que las opciones Cambiar nombre de archivos bloqueados y Quitar la conexión de la aplicación estén habilitadas. Para la implementación sin tiempo de inactividad, use la opción de intercambio de ranuras.
  • Al implementar en un App Service que tiene configurado Application Insights y ha habilitado Quitar archivos adicionales en el destino, asegúrese de habilitar también Excluir archivos de la carpeta App_Data para mantener la extensión de Application Insights segura. Esto es necesario porque el trabajo web continuo de Application Insights se instala en la carpeta App_Data.

Métodos de implementación

Hay varios métodos de implementación disponibles en esta tarea. Web Deploy (msdeploy.exe) es el valor predeterminado. Para cambiar la opción de implementación, expanda Opciones de implementación adicionales y habilite Seleccionar método de implementación para elegir entre opciones de implementación adicionales basadas en paquetes.

La tarea elige una tecnología de implementación adecuada en función del tipo de Azure App Service y agente. Las diferentes tecnologías de implementación usadas por la tarea son:

La tarea intenta seleccionar de forma predeterminada la tecnología de implementación adecuada en función del tipo de paquete de entrada, App Service y sistema operativo del agente.

Detección automática de lógica

Para agentes basados en Windows.

Tipo de App Service Tipo de paquete Método de implementación
Aplicación web en Linux o aplicación de funciones en Linux Folder/Zip/jar
War
Implementación de Zip War Deploy
Aplicación web para contenedores (Linux) o aplicación de funciones para contenedores (Linux) Actualización de la configuración de la aplicación N/D
Aplicación web en Windows, aplicación de funciones en Windows, aplicación de API o aplicación móvil Tipo
de paquete MsBuild de War Jar
o implementación en la carpeta o zip de la aplicación


virtual
War Deploy Zip Deploy

Web Deploy

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

En agentes que no son de Windows (para cualquier tipo de App Service), la tarea se basa en las API REST de Kudu para implementar la aplicación.

Web Deploy

Web Deploy (msdeploy.exe) se puede usar para implementar una aplicación web en Windows o una aplicación de funciones en Azure App Service mediante un agente de Windows. Web Deploy es una característica muy rica que ofrece opciones como:

  • Cambiar el nombre de los archivos bloqueados: Cambie el nombre de cualquier archivo que todavía esté en uso por el servidor web habilitando la marca MSDEPLOY\_RENAME\_LOCKED\_FILES=1 msdeploy en la configuración de Azure App Service. Si se establece esta opción, permite que msdeploy cambie el nombre de los archivos bloqueados durante la implementación de la aplicación.

  • Quitar archivos adicionales en el destino: Elimina los archivos de Azure App Service que no tengan ningún archivo coincidente en el paquete de artefactos o en la carpeta App Service que se está implementando.

  • Excluir los archivos de la carpeta App_Data: Impide que los archivos de la carpeta App_Data (en el paquete o carpeta del artefacto que se implementa) se implementen en Azure App Service

  • Argumentos adicionales de Web Deploy: Argumentos que se aplicarán al implementar Azure App Service. Ejemplo: -disableLink:AppPoolExtension -disableLink:ContentExtension. Para obtener más ejemplos de configuración de operaciones de Web Deploy, consulte Configuración de la operación de Web Deploy.

Instale Web Deploy en el agente desde Web Deploy 3.6. Web Deploy 3.5 debe instalarse sin el soporte del conjunto SQL. No es necesario elegir ninguna configuración personalizada al instalar Web Deploy. Web Deploy se instala en C:/Program Files (x86)/IIS/Microsoft Web Deploy V3.

API de REST de Kudu

Las API REST de Kudu funcionan en agentes de automatización de Windows y Linux cuando el destino es una aplicación web en Windows, aplicación web en Linux (origen integrado) o aplicación de funciones. La tarea usa Kudu para copiar archivos en Azure App Service.

Container Registry

Funciona en agentes de automatización de Windows y Linux cuando el destino es una aplicación web para contenedores. La tarea actualiza la aplicación estableciendo el registro de contenedor, el repositorio, el nombre de la imagen y la información de etiqueta adecuados. También puede usar la tarea para transferir un comando de inicio a la imagen de contenedor.

Implementación de archivo ZIP

Espera un paquete de implementación .zip e implementa el contenido del archivo en la carpeta wwwroot de App Service o aplicación de funciones en Azure. Esta opción sobrescribe todo el contenido existente en la carpeta wwwroot . Para más información, consulte Implementación Zip para Azure Functions.

Ejecución desde paquete

Espera el mismo paquete de implementación que para implementar archivos Zip. Sin embargo, en lugar de implementar archivos en la carpeta wwwroot, todo el paquete lo monta en el tiempo de ejecución de las funciones y los archivos de la carpeta wwwroot se convierten en solo lectura. Para más información, consulte Run your Azure Functions from a package file (Ejecución de Azure Functions desde un archivo de paquete).

Implementación de War

Espera un paquete de implementación .war e implementa el contenido del archivo en la carpeta wwwroot o en la carpeta webapps del App Service en Azure.

Solución de problemas

No puedo realizar la implementación web en mi Azure App Service mediante Microsoft Entra ID autenticación desde mi agente de Windows

La tarea de implementación de Azure App Service admite la conexión a Microsoft Azure con una conexión de servicio arm mediante Microsoft Entra ID, a menos que estén presentes las tres condiciones siguientes:

  • Usa el formato de paquete web Deploy en un agente de Windows.
  • El agente se ejecuta con una versión anterior de msdeploy.exe (por ejemplo, al usar la imagen del agente hospedado de windows-2019 ).
  • La autenticación básica está deshabilitada para la Azure App Service

Si estas tres condiciones están presentes, recibirá un error como 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.

Para resolver este problema, puede elegir entre las siguientes opciones, en orden de preferencia.

  1. Actualice la imagen del agente. Si usa agentes hospedados, pase de windows-2019 a windows-2022 (o windows-latest). Si usa agentes autohospedados, instale Visual Studio 2022 en el agente para obtener una versión más reciente de msdeploy.exe.
  2. Si depende de una imagen de agente anterior y no puede actualizar el agente de la canalización, considere la posibilidad de dividir el trabajo para que la Azure App Service tarea de implementación se ejecute en windows-2022 (o windows-latest).
  3. Si ninguna de estas opciones es posible, puede habilitar la autenticación básica para la Azure App Service.

Error: No se pudo recuperar el token de acceso para Azure. Compruebe si la entidad de servicio usada es válida y no ha expirado.

La tarea usa la entidad de servicio en la conexión de servicio para autenticarse con Azure. Si la entidad de servicio ha expirado o no tiene permisos para App Service, se produce este error en la tarea. Compruebe la validez de la entidad de servicio usada y que se encuentra en el registro de la aplicación. Para más información, consulte Uso del control de acceso basado en rol para administrar el acceso a los recursos de la suscripción de Azure. Esta entrada de blog también contiene más información sobre el uso de la autenticación de entidad de servicio.

Error de SSL

Si desea usar un certificado en App Service, dicho certificado debe estar firmado por una entidad de certificación de confianza. Si la aplicación web genera errores de validación del certificado, probablemente se esté usando un certificado autofirmado. Establezca una variable denominada VSTS_ARM_REST_IGNORE_SSL_ERRORS en el valor true de la canalización de compilación o versión para resolver el error.

Una versión se bloquea durante mucho tiempo y luego se produce un error.

Este problema podría ser el resultado de una capacidad insuficiente en el plan de App Service. Para resolverlo, puede escalar verticalmente la instancia de App Service para aumentar la CPU, la memoria RAM y el espacio en disco disponibles, o probar con un plan de App Service diferente.

Códigos de error 5xx

Si ve un error 5xx, compruebe el estado del servicio de Azure.

La función de Azure de repente dejó de funcionar

Azure Functions puede dejar de funcionar de repente si ha transcurrido más de un año desde la última implementación. Si implementa con "RunFromPackage" en "deploymentMethod", se genera una SAS con una fecha de expiración de 1 año y se establece como el valor de "WEBSITE_RUN_FROM_PACKAGE" en la configuración de la aplicación. Azure Functions usa esta SAS para hacer referencia al archivo de paquete para la ejecución de la función, por lo que si la SAS ha expirado, la función no se ejecutará. Para resolver este problema, vuelva a implementar para generar una SAS con una fecha de expiración de un año.

Error: No se encontró ningún paquete con el patrón especificado

Compruebe si el paquete mencionado en la tarea se publica como artefacto en la compilación o en una fase anterior y se descarga en el trabajo actual.

Error: la publicación mediante la opción de Implementación de archivo ZIP no se admite para el tipo de paquete MSBuild

Los paquetes web creados mediante la tarea MSBuild (con argumentos predeterminados) tienen una estructura de carpetas anidada que solo se puede implementar correctamente mediante Web Deploy. No se puede usar la opción de publicar en la implementación del archivo ZIP para implementar esos paquetes. Para convertir la estructura de empaquetado, siga estos pasos:

  1. En la tarea Compilar solución, cambie los argumentos MSBuild a /p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:publishUrl="$(System.DefaultWorkingDirectory)\\WebAppContent":

    Captura de pantalla que muestra los valores de Compilar solución.

  2. Agregue una tarea de archivar y cambie los valores de la siguiente manera:

    1. Cambie el archivo o carpeta raíz que se va a archivar a $(System.DefaultWorkingDirectory)\\WebAppContent.

    2. Desactive la casilla Anteponer el nombre de la carpeta raíz a las rutas de acceso de archivos:

      Captura de pantalla que muestra los valores de Archivar.

La implementación de la aplicación web en Windows se realizó correctamente, pero la aplicación no funciona

Esto puede deberse a que web.config no está presente en la aplicación. Puede agregar un archivo web.config al origen o generar uno automáticamente mediante las opciones de transformación de archivo y sustitución de variables de la tarea.

  • Haga clic en la tarea y vaya a Generar parámetros web.config para aplicaciones de Python, Node.js, Go y Java.

    Captura de pantalla del cuadro de diálogo Generar parámetros de web.config.

  • Haga clic en el botón Generar parámetros de web.config para aplicaciones de Python, Node.js, Go y Java para editar los parámetros.

    Captura de pantalla de la lista desplegable Marco de aplicación.

  • Seleccione el tipo de aplicación en la lista desplegable.

  • Haga clic en Aceptar. Esto rellenará los parámetros web.config necesarios para generar web.config.

Nota:

Esta sección está en desuso y se ha reemplazado por la tarea Transformación de archivos.

ERROR_FILE_IN_USE

Al implementar aplicaciones .NET en aplicaciones web en Windows, es posible que se produzca un error en la implementación con código de error ERROR_FILE_IN_USE. Para resolver el error, asegúrese de que las opciones Cambiar nombre de archivos bloqueados y Quitar la aplicación sin conexión están habilitadas en la tarea. Para implementaciones sin tiempo de inactividad, use el intercambio de ranuras.

También puede usar el método Ejecutar desde implementación de paquetes para evitar el bloqueo de recursos.

Error de Web Deploy

Si usa Web Deploy para implementar la aplicación, en algunos escenarios de error de Web Deploy mostrarán un código de error en el registro. Para solucionar un error de implementación web, consulte Códigos de error de Web Deploy.

La implementación de la aplicación web en App Service Environment (ASE) no funciona

  • Asegúrese de que el agente de compilación de Azure DevOps esté en la misma red virtual (la subred puede ser diferente) que la instancia interna de Load Balancer (ILB) de ASE. Esto permitirá que el agente extraiga el código de Azure DevOps e implemente en ASE.
  • Si usa Azure DevOps, el agente no necesita ser accesible desde Internet, pero solo necesita acceso saliente para conectarse a Azure DevOps Service.
  • Si usa TFS/Azure DevOps Server implementado en una red virtual, el agente se puede aislar completamente.
  • El agente de compilación debe configurarse con la configuración DNS de la aplicación web en la que debe implementarse. Dado que los recursos privados de la red virtual no tienen entradas en Azure DNS, esto debe agregarse al archivo de hosts en el equipo del agente.
  • Si se usa un certificado autofirmado para la configuración de ASE, la -allowUntrusted opción debe establecerse en la tarea de implementación para MSDeploy. También se recomienda establecer la variable VSTS_ARM_REST_IGNORE_SSL_ERRORS en true. Si se usa un certificado de una entidad de certificación para la configuración de ASE, no debería ser necesario. Si va a realizar la implementación en una ranura configurada para el intercambio automático, se producirá un error en el intercambio a menos que establezca SCM_SKIP_SSL_VALIDATION o SCM_SKIP_ASE_SSL_VALIDATION en 1 en los valores de configuración de App Services.

Preguntas más frecuentes

¿Cuál es la diferencia entre las AzureWebApp tareas y AzureRmWebAppDeployment ?

La tarea Aplicación web de Azure (AzureWebApp) es la manera más sencilla de implementar en una aplicación web de Azure. De forma predeterminada, la implementación se produce en la aplicación raíz de la aplicación web de Azure.

La Azure App Service tarea Implementar (AzureRmWebAppDeployment) puede controlar escenarios más personalizados, como:

Nota

Las transformaciones de archivos y la sustitución de variables también son compatibles con la tarea Transformación de archivos independiente para su uso en Azure Pipelines. Puede usar la tarea Transformación de archivos para aplicar transformaciones de archivo y sustituciones de variables en cualquier archivo de configuración y parámetros.

¿Cómo debo configurar mi conexión de servicio?

Esta tarea requiere una conexión de servicio de Azure Resource Manager.

¿Cómo debo configurar la implementación de Webjob con Application Insights?

Al implementar en App Service, si tiene Application Insights configurado y ha habilitado Remove additional files at destination, también debe habilitar Exclude files from the App_Data folder. Al habilitar esta opción, la extensión de Application Insights se mantiene segura. Este paso es necesario porque el WebJob continuo de Application Insights está instalado en la carpeta App_Data.

¿Cómo debo configurar mi agente si está detrás de un proxy mientras se implementa en App Service?

Si el agente autohospedado requiere un proxy web, puede informar al agente sobre el proxy durante la configuración. Esto permite al agente conectarse a Azure Pipelines o Azure DevOps Server a través del proxy. Obtenga más información sobre cómo ejecutar un agente autohospedado detrás de un proxy web.

Ejemplos

Implementación en un tipo de aplicación específico

Para realizar la implementación en un tipo de aplicación específico, establezca appType en cualquiera de los siguientes valores aceptados: webApp (aplicación web en Windows), webAppLinux (aplicación web en Linux), webAppContainer (aplicación web para contenedores - Linux), functionApp (aplicación de funciones en Windows), functionAppLinux (aplicación de funciones en Linux), functionAppContainer (aplicación de funciones para contenedores - Linux), apiApp (aplicación de API), mobileApp (aplicación móvil). Si no se menciona, webApp se toma como valor predeterminado.

Para habilitar las opciones de implementación avanzadas, agregue el parámetro enableCustomDeployment: true e incluya los parámetros siguientes según sea necesario.

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

Implementación en un contenedor linux de Azure Web App

En el ejemplo de YAML siguiente se implementa en un contenedor de Azure Web App (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)

Implementación de una aplicación web en una App Service de Windows en ranuras de implementación

En el ejemplo siguiente se implementa una aplicación web en una App Service de Windows entre ranuras de implementación.

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'

Agregar script después de la implementación

La tarea proporciona una opción para personalizar la implementación proporcionando un script que se ejecutará en Azure App Service después de que los artefactos de la aplicación se hayan copiado correctamente en el App Service. Puede optar por proporcionar un script de implementación insertado o la ruta de acceso y el nombre de un archivo de script en la carpeta de artefactos.

Esto es muy útil cuando desea restaurar las dependencias de la aplicación directamente en el App Service. La restauración de paquetes para aplicaciones de Node, PHP y Python ayuda a evitar tiempos de espera cuando la dependencia de la aplicación da lugar a un artefacto grande que se copia desde el agente a la Azure App Service.

Un ejemplo de un script de implementación es:

@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
)

Requisitos

Requisito Descripción
Tipos de canalización YAML, compilación clásica, versión clásica
Se ejecuta en Agente, DeploymentGroup
Peticiones None
Capabilities Esta tarea no satisface ninguna demanda de tareas posteriores en el trabajo.
Restricciones de comandos Any
Variables que se pueden establecer Any
Versión del agente 2.104.1 o superior
Categoría de la tarea: Implementar

Consulte también

  • Esta tarea es de código abierto en GitHub. Los comentarios y las contribuciones son bienvenidos.