AzureRmWebAppDeployment@4: tarea de implementación v4 de Azure App Service
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 de Azure Functions.
Actualice Azure App 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 Web Deploy/API REST de Kudu.
Sintaxis
# 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 va a usar para implementar la aplicación web.
Especifique Publish Profile
para usar visual Studio creado Perfiles de publicación.
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 va a usar para implementar la aplicación web.
azureSubscription
-
de suscripción de Azure
Alias de entrada: ConnectedServiceName
.
string
. Obligatorio cuando ConnectionType = AzureRM
.
Especifique la suscripción de Azure Resource Manager para la implementación.
PublishProfilePath
-
publicar ruta de acceso del perfil
string
. Obligatorio cuando ConnectionType = PublishProfile
. Valor predeterminado: $(System.DefaultWorkingDirectory)/**/*.pubxml
.
Ruta de acceso del perfil de publicación creado a partir de Visual Studio.
PublishProfilePassword
-
de contraseña de perfil de publicación
string
. Obligatorio cuando ConnectionType = PublishProfile
.
Se recomienda almacenar una contraseña en una variable secreta y usar esa variable aquí, por ejemplo, $(Password)
.
de tipo
Alias de entrada: WebAppKind
.
string
. Obligatorio 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, Uso de la tarea Azure Functions)), functionAppLinux
(aplicación de funciones en Linux (no recomendado, uso de la tarea Azure Functions)), functionAppContainer
(aplicación de funciones para contenedores (Linux) (no recomendado, uso de 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.
de tipo
Alias de entrada: WebAppKind
.
string
. Obligatorio cuando ConnectionType = AzureRM
. Valores permitidos: webApp
(Aplicación web en Windows), webAppLinux
(Aplicación web en Linux), webAppContainer
(Web App for Containers [Linux]), functionApp
(Aplicación de funciones en Windows), functionAppLinux
(Aplicación de funciones en Linux), functionAppContainer
(Function App for Containers (Linux)), 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.
WebAppName
-
nombre de App Service
string
. Obligatorio cuando ConnectionType = AzureRM
.
Especifique el nombre de una instancia de Azure App Service existente. Los servicios de aplicaciones basados en el tipo de aplicación seleccionado solo se mostrarán al usar el asistente de tareas.
deployToSlotOrASE
-
implementación en ranuras o app Service Environment
Alias de entrada: DeployToSlotOrASEFlag
.
boolean
. Opcional. Use cuando ConnectionType = AzureRM && WebAppKind != ""
. Valor predeterminado: false
.
Especifique la opción de 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 para la ranura de producción de Production
y especifique solo el nombre del grupo de recursos.
del grupo de recursos de
string
. Obligatorio cuando DeployToSlotOrASEFlag = true
.
El nombre del grupo de recursos es necesario cuando el destino de implementación es una ranura de implementación o una instancia de App Service Environment.
Especifique el grupo de recursos de Azure que contiene azure App Service especificado anteriormente.
de ranura de
string
. Obligatorio cuando DeployToSlotOrASEFlag = true
. Valor predeterminado: production
.
Especifique una ranura existente que no sea la ranura producción.
DockerNamespace
-
registro o espacio de nombres
string
. Obligatorio 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 de imagen completo tendrá el formato: {registry or namespace}/{repository}:{tag}
. Por ejemplo, myregistry.azurecr.io/nginx:latest
.
DockerNamespace
-
registro o espacio de nombres
string
. Obligatorio 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 de imagen completo tendrá el formato: {registry or namespace}/{repository}:{tag}
. Por ejemplo, myregistry.azurecr.io/nginx:latest
.
DockerNamespace
-
registro o espacio de nombres
string
. Obligatorio 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 de imagen completo tendrá el formato: {registry or namespace}/{repository}:{tag}
. Por ejemplo, myregistry.azurecr.io/nginx:latest
.
DockerRepository
-
image
string
. Obligatorio cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = webAppHyperVContainer
.
Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre de imagen completo tendrá el formato: {registry or namespace}/{repository}:{tag}
. Por ejemplo, myregistry.azurecr.io/nginx:latest
.
DockerRepository
-
image
string
. Obligatorio cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppkind = webAppHyperVContainer
.
Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre de imagen completo tendrá el formato: {registry or namespace}/{repository}:{tag}
. Por ejemplo, myregistry.azurecr.io/nginx:latest
.
DockerRepository
-
image
string
. Obligatorio cuando WebAppKind = webAppContainer || WebAppkind = functionAppContainer
.
Nombre del repositorio donde se almacenan las imágenes de contenedor. Nota: El nombre de imagen completo 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 || WebAppKind = webAppHyperVContainer
.
Las etiquetas son el mecanismo que usan los registros para aplicar información de versión a imágenes de Docker. Nota: El nombre de imagen completo 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 || WebAppkind = webAppHyperVContainer
.
Las etiquetas son el mecanismo que usan los registros para aplicar información de versión a imágenes de Docker. Nota: El nombre de imagen completo 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 imágenes de Docker. Nota: El nombre de imagen completo 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 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 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
. Obligatorio 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
.
string
. Opcional. Use cuando WebAppKind = webAppLinux
.
Especifique el marco y la versió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 v2/v3)), NODE|12
(NODE|12 (functionapp v3)), NODE|14
(NODE|14 (functionapp v3)), PYTHON|3.6
(PYTHON|3.6 (functionapp v2/v3)), PYTHON|3.7
(PYTHON|3.7 (functionapp v2/v3)), PYTHON|3.8
(PYTHON|3.8 (functionapp v3)).
Especifique el marco y la versión. Consulte la información general sobre las versiones en tiempo de ejecución de Azure Functions para las versiones en tiempo de ejecución compatibles. Los valores antiguos como DOCKER|microsoft/azure-functions-*
están en desuso. Use los nuevos valores de la lista desplegable.
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 Startup
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 Startup
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 Startup
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 Startup
string
. Opcional. Use cuando WebAppKind = webAppLinux || WebAppKind = webAppContainer || WebAppkind = functionAppContainer || WebAppKind = functionAppLinux
.
Especifique el comando Startup. Por ejemplo, dotnet run
dotnet filename.dll
.
StartupCommand
-
comando Startup
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 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 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 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 implementación de Azure App Service.
de script insertado de
string
. Obligatorio 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.
.
Script que se va a ejecutar. Puede proporcionar los comandos de implementación aquí, un comando por línea. Vea el ejemplo siguiente.
de script insertado de
string
. Obligatorio cuando ScriptType == Inline Script && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer
. Valor predeterminado: :: You can provide your deployment commands here. One command per line.
.
Script que se va a ejecutar. Puede proporcionar los comandos de implementación aquí, un comando por línea. Vea el ejemplo siguiente.
ScriptPath
-
ruta de acceso del script de implementación
string
. Obligatorio 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
. Obligatorio cuando ScriptType == File Path && ConnectionType = AzureRM && WebAppKind != "" && WebAppKind != webAppContainer && WebAppkind != functionAppContainer
.
Ruta de acceso y nombre del script que se va a ejecutar.
WebConfigParameters
-
Generar parámetros de 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 Web.config
estándar 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 las aplicaciones de node.js
, web.config
tendrá un archivo de inicio y iis_node valores de módulo. Esta característica de edición solo es para el web.config
generado. Obtenga más información sobre implementación de Azure App Service.
WebConfigParameters
-
Generar parámetros de 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 Web.config
estándar 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 las aplicaciones de node.js
, web.config
tendrá un archivo de inicio y iis_node valores de módulo. Esta característica de edición solo es para el web.config
generado. Obtenga más información sobre implementación de Azure App Service.
de configuración de la aplicación de
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 incluirse entre comillas dobles. Ejemplos: -Port 5000 -RequestTimeout 5000
y -WEBSITE_TIME_ZONE "Eastern Standard Time"
. Para proporcionar dos o más valores de clave, los valores de clave deben estar separados por un espacio. Ejemplo: -key1 "Value1" -Key2 "Value2"
.
ConfigurationSettings
-
opciones de 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 incluirse entre comillas dobles. Ejemplo: -phpVersion 5.6 -linuxFxVersion node|6.11
.
enableCustomDeployment
-
Seleccionar 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 no está activada 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 el asistente de tareas para ver los métodos de implementación admitidos y elija una para implementar la aplicación.
enableCustomDeployment
-
Seleccionar 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 no está activada 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 el asistente de tareas para ver los métodos de implementación admitidos y elija una para implementar la aplicación.
de método de implementación de
string
. Obligatorio 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.
de método de implementación de
string
. Obligatorio 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 Azure App Service colocando un archivo app_offline.htm
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 Azure App Service colocando un archivo app_offline.htm
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 archivo SetParameters.xml
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 archivo SetParameters.xml
que se va a usar.
RemoveAdditionalFilesFlag
-
Quitar archivos adicionales en el de 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 Azure App Service que no tengan archivos coincidentes en el paquete o carpeta de App Service. Esto también quitará todos los archivos relacionados con cualquier extensión instalada en esta instancia de Azure App Service. Para evitar esto, active la casilla Exclude files from App_Data folder
.
RemoveAdditionalFilesFlag
-
Quitar archivos adicionales en el de 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 Azure App Service que no tengan archivos coincidentes en el paquete o carpeta de App Service. Esto también quitará todos los archivos relacionados con cualquier extensión instalada en esta instancia de Azure App Service. Para evitar esto, active la casilla Exclude files from App_Data folder
.
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 carpeta App_Data
se implementen o eliminen de 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 carpeta App_Data
se implementen o eliminen de 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 siguiendo la sintaxis -key:value
. Se aplicarán al implementar Azure App Service. Ejemplos: -disableLink:AppPoolExtension -disableLink:ContentExtension
. Obtenga más información sobre configuración de 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 siguiendo la sintaxis -key:value
. Se aplicarán al implementar Azure App Service. Ejemplos: -disableLink:AppPoolExtension -disableLink:ContentExtension
. Obtenga más información sobre configuración de 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 MSDEPLOY_RENAME_LOCKED_FILES=1
en la configuración de la aplicación de Azure App Service. 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 MSDEPLOY_RENAME_LOCKED_FILES=1
en la configuración de la aplicación de Azure App Service. 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
-
de 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 el *.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
-
de 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 el *.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
-
de 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 la configSections
, appSettings
, applicationSettings
, applicationSettings
y connectionStrings
secciones de cualquier archivo de configuración y archivo de parameters.xml
. 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
-
de 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 la configSections
, appSettings
, applicationSettings
, applicationSettings
y connectionStrings
secciones de cualquier archivo de configuración y archivo de parameters.xml
. 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
-
de 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 expresiones JSONPath
. 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 sustitución de variables JSON.
JSONFiles
-
de 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 expresiones JSONPath
. 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 sustitución de variables JSON.
Opciones de control de tareas
Todas las tareas tienen opciones de control además de sus entradas de tarea. Para obtener más información, consulte 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 servicio de aplicaciones seleccionado.
Observaciones
- Requisitos previos para el de tareas
- notas de uso
- métodos de implementación de
- solución de problemas de
- preguntas más frecuentes
Use esta tarea para implementar en una variedad 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 para ASP.NET, ASP.NET Core, PHP, Java, Python, Goy Node.js aplicaciones web basadas en Node.js.
La tarea se puede usar para implementar en una variedad de Azure App Services, como:
- Web Apps en Windows y Linux
- Web Apps for Containers
- Function Apps en Windows y Linux
- Function Apps for Containers
- webJobs de
- Aplicaciones configuradas en entornos de Azure App Service
Requisitos previos para la tarea
Los siguientes requisitos previos deben configurarse en las máquinas 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 desde el azure Portal y configurado allí. Como alternativa, el
tarea de Azure PowerShell se puede usar para ejecutar scripts de Azure PowerShell para aprovisionar y configurar la aplicación web. de suscripción de Azure. Para realizar la implementación en Azure, una suscripción de Azure debe estar vinculada a la canalización. La tarea no funciona con la conexión de servicio de Azure clásico 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 de .
- Para pasar por alto los errores de SSL, defina una variable denominada
VSTS_ARM_REST_IGNORE_SSL_ERRORS
con el valortrue
en la canalización. Si va a implementar en una ranura configurada para el intercambio automático, el intercambio producirá un error a menos que establezcaSCM_SKIP_SSL_VALIDATION
oSCM_SKIP_ASE_SSL_VALIDATION
en1
en las opciones de configuración de App Services. - En el caso de las aplicaciones .NET destinadas a aplicación web en Windows, evite los errores de implementación con el error
ERROR_FILE_IN_USE
asegurándose de que cambiar el nombre de los archivos bloqueados y configuración de Quitar la aplicación sin conexión están habilitadas. Para una implementación sin tiempo de inactividad, use la opción de intercambio de ranuras. - Al implementar en una instancia de App Service que tenga Configurado Application Insights y haya 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 en un estado seguro. 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 elegir entre opciones de implementación basadas en paquetes adicionales.
En función del tipo de Azure App Service y el agente, la tarea elige una tecnología de implementación adecuada. Las distintas tecnologías de implementación usadas por la tarea son:
- Web Deploy
- API rest de Kudu
-
Container Registry - Zip Deploy
- ejecutar desde el paquete
- War Deploy
De forma predeterminada, la tarea intenta seleccionar la tecnología de implementación adecuada en función del tipo de paquete de entrada, el tipo de App Service y el 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 |
---|---|---|
WebApp en Linux o Function App en Linux | Folder/Zip/jar War |
Zip Deploy War Deploy |
WebApp for Containers (Linux) o Function App for Containers (Linux) | Actualización de la configuración de la aplicación | NA |
WebApp en Windows, Aplicación de funciones en Windows, Aplicación de API o Aplicación móvil | War Jar tipo de paquete msBuild o implementación en la aplicación virtual Carpeta/Zip |
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 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 enriquecida y ofrece opciones como:
Cambiar el nombre de los archivos bloqueados: Cambie el nombre de cualquier archivo que aún esté en uso por el servidor web habilitando la marca msdeploy
MSDEPLOY\_RENAME\_LOCKED\_FILES=1
en la configuración de Azure App Service. Esta opción, si se establece, permite a msdeploy cambiar el nombre de los archivos bloqueados durante la implementación de la aplicación.Quitar archivos adicionales en el destino: Elimina archivos en Azure App Service que no tienen archivos coincidentes en el paquete de artefactos o carpeta de App Service que se está implementando.
Excluir archivos de la carpeta App_Data: Impedir archivos en la carpeta App_Data (en el paquete o carpeta del artefacto que se está implementando) en Azure App Service
argumentos De implementación web adicionales: argumentos que se aplicarán al implementar Azure App Service. Ejemplo:
-disableLink:AppPoolExtension -disableLink:ContentExtension
. Para obtener más ejemplos de configuración de operación de implementación web, consulte Configuración de operación de implementación web.
Instale Web Deploy en el agente desde Web Deploy 3.6. Web Deploy 3.5 debe instalarse sin la compatibilidad con SQL agrupada. 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 rest de Kudu
las API rest de Kudu funcionan en los agentes de automatización de Windows y Linux cuando el destino es una aplicación web en Windows, Web App en Linux (origen integrado) o Function App. 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 pasar un comando de inicio para la imagen de contenedor.
Implementación de Zip
Espera un paquete de implementación de .zip e implementa el contenido del archivo en la carpeta wwwroot de App Service o Function App en Azure. Esta opción sobrescribe todo el contenido existente en la carpeta wwwroot. Para más información, consulte implementación de Zip para Azure Functions.
Ejecutar desde el paquete
Espera el mismo paquete de implementación que Zip Deploy. Sin embargo, en lugar de implementar archivos en la carpeta wwwroot de
Implementación de guerra
Espera un paquete de implementación .war e implementa el contenido del archivo en la carpeta wwwroot
Solución de problemas
No puedo realizar la implementación web en mi instancia de Azure App Service mediante la autenticación de id. de Microsoft Entra 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 el identificador de Entra de Microsoft, 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 windows-2019).
- La autenticación básica está deshabilitada para 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.
- Actualice la imagen del agente. Si usa agentes hospedados, vaya de windows-2019 a windows-2022 (o más reciente de Windows). Si usa agentes autohospedados, instale Visual Studio 2022 en el agente para obtener una versión más reciente de msdeploy.exe.
- 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 tarea de implementación de Azure App Service se ejecute en windows-2022 (o más reciente de Windows).
- Si ninguna de estas opciones es posible, puede habilitar la autenticación básica para Azure App Service.
Error: No se pudo capturar 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 un error en la tarea. Compruebe la validez de la entidad de servicio usada y que esté presente 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 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 ssl
Si desea usar un certificado en App Service, el certificado debe estar firmado por una entidad de certificación de confianza. Si la aplicación web proporciona errores de validación de certificados, probablemente esté usando un certificado autofirmado. Establezca una variable denominada VSTS_ARM_REST_IGNORE_SSL_ERRORS
en el valor true
en la canalización de compilación o versión para resolver el error.
Una versión se bloquea durante mucho tiempo y, a continuación, se produce un error
Este problema podría ser el resultado de una capacidad insuficiente en el plan de App Service. Para resolver este problema, puede escalar verticalmente la instancia de App Service para aumentar la CPU, la RAM y el espacio en disco disponibles o probar con un plan de App Service diferente.
5 códigos de error xxxx
Si ve un error de 5xx, compruebe el estado del servicio de Azure.
La función de Azure de repente dejó de funcionar
Azure Functions puede dejar de funcionar repentinamente 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 un artefacto en la compilación o una fase anterior y se descarga en el trabajo actual.
Error: No se admite publicar con la opción de implementación zip para el tipo de paquete msBuild.
Los paquetes web creados a través de la tarea de MSBuild (con argumentos predeterminados) tienen una estructura de carpetas anidada que solo se puede implementar correctamente mediante Web Deploy. La opción de implementación publicar en zip no se puede usar para implementar esos paquetes. Para convertir la estructura de empaquetado, siga estos pasos:
En la tarea Compilar solución, cambie el argumentos de MSBuild a
/p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:publishUrl="$(System.DefaultWorkingDirectory)\\WebAppContent"
:Agregue una tarea Archivar y cambie los valores de la siguiente manera:
Cambie carpeta raíz o archivo para archivar a
$(System.DefaultWorkingDirectory)\\WebAppContent
.Desactive la casilla Nombre de carpeta raíz anteponer para archivar rutas de acceso:
La implementación de aplicaciones web en Windows se realiza 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 de web.config para Python, Node.js, Go y aplicaciones java.
Haga clic en el botón Más generar parámetros web.config para Python, Node.js, Go y aplicaciones java para editar los parámetros.
Seleccione el tipo de aplicación en la lista desplegable.
Haga clic en Aceptar. Esto rellenará web.config parámetros 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 Web App 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 cambiar el nombre de los archivos bloqueados y opciones de 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 método Ejecutar desde la implementación de paquetes para evitar el bloqueo de recursos.
Error de implementación web
Si usa la implementación web para implementar la aplicación, en algunos escenarios de error Web Deploy mostrará 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 aplicaciones 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 el equilibrador de carga interno (ILB) de ASE. Esto permitirá que el agente extraiga código de Azure DevOps e implemente en ASE.
- Si usa Azure DevOps, no es necesario que el agente sea 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 puede estar completamente aislado.
- 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 la máquina del agente.
- Si se usa un certificado autofirmado para la configuración de ASE, la opción
-allowUntrusted
debe establecerse en la tarea de implementación para MSDeploy. También se recomienda establecer la variableVSTS_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 debe ser necesario. Si va a implementar en una ranura configurada para el intercambio automático, el intercambio producirá un error a menos que establezcaSCM_SKIP_SSL_VALIDATION
oSCM_SKIP_ASE_SSL_VALIDATION
en1
en las opciones de configuración de App Services.
Preguntas más frecuentes
¿Cuál es la diferencia entre las tareas de AzureWebApp
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 Azure Web App.
La tarea De implementación de Azure App Service (AzureRmWebAppDeployment
) puede controlar escenarios más personalizados, como:
- Modificar las opciones de configuración dentro de paquetes web y archivos de parámetros XML.
- Implementar con Web Deploy, si se usa para el proceso de implementación de IIS.
- Implementación en aplicaciones virtuales.
- Implemente en otros tipos de aplicaciones, como aplicaciones de contenedor, aplicaciones de funciones, WebJobs o API y aplicaciones móviles.
Nota
Las transformaciones de archivos y la sustitución de variables también son compatibles con la tarea de 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 trabajos web con Application Insights?
Al implementar en una instancia de App Service, si ha configurado Application Insights 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 en un estado seguro. Este paso es necesario porque el trabajo web continuo de Application Insights se instala en la carpeta App_Data.
¿Cómo debo configurar mi agente si está detrás de un proxy mientras estoy implementando 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
- implementación en el contenedor de Linux de Azure Web App
- Implementación de una aplicación web en una instancia de Windows App Service en ranuras de implementación
- script posterior a la implementación de ejemplo
Implementación en un tipo de aplicación específico
Para implementar 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
(Web App for Containers - 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 instancia de Windows App Service entre ranuras de implementación
En el ejemplo siguiente se implementa una aplicación web en una instancia de Windows App Service 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'
Script posterior a la implementación de ejemplo
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 App Service. Puede elegir 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 App Service. La restauración de paquetes para aplicaciones node, PHP y python ayuda a evitar tiempos de espera cuando la dependencia de la aplicación da lugar a que se copie un artefacto grande desde el agente a 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 |
demandas | Ninguno |
funcionalidades de |
Esta tarea no satisface ninguna demanda de tareas posteriores en el trabajo. |
restricciones de comandos | Cualquier |
variables settable | Cualquier |
Versión del agente | 2.104.1 o superior |
Categoría de tarea | Desplegar |
Consulte también
- Esta tarea es de código abierto en GitHub. Comentarios y contribuciones son bienvenidos.