活动
AzureAppServiceManage@0 - Azure 应用服务管理 v0 任务
启动、停止、重启、交换槽、删除槽、安装站点扩展或为Azure 应用服务启用持续监视。
启动、停止、重启、交换槽、安装站点扩展或为Azure 应用服务启用持续监视。
# Azure App Service manage v0
# Start, stop, restart, slot swap, slot delete, install site extensions or enable continuous monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
inputs:
azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription.
#Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Start Swap With Preview' | 'Complete Swap' | 'Cancel Swap' | 'Delete Slot' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
WebAppName: # string. Required. App Service name.
#SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swap. Specify Slot or App Service Environment. Default: false.
#ResourceGroupName: # string. Required when Action = Swap Slots || Action = Delete Slot || SpecifySlot = true || Action = Start Swap With Preview || Action = Complete Swap || Action = Cancel Swap. Resource group.
#SourceSlot: # string. Required when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Source Slot.
#SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Swap with Production. Default: true.
#TargetSlot: # string. Required when SwapWithProduction = false. Target Slot.
#PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Preserve Vnet. Default: false.
#Slot: 'production' # string. Required when Action = Delete Slot || Action = Cancel Swap || SpecifySlot = true. Slot. Default: production.
#ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions.
#OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable.
#AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights.
#ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name.
# Advanced Settings
#ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.
# Azure App Service manage v0
# Start, stop, restart, slot swap, install site extensions or enable continuous monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
inputs:
azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription.
#Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
WebAppName: # string. Required. App Service name.
#SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots. Specify Slot or App Service Environment. Default: false.
#ResourceGroupName: # string. Required when Action = Swap Slots || SpecifySlot = true. Resource group.
#SourceSlot: # string. Required when Action = Swap Slots. Source Slot.
#SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots. Swap with Production. Default: true.
#TargetSlot: # string. Required when Action = Swap Slots && SwapWithProduction = false. Target Slot.
#PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots. Preserve Vnet. Default: false.
#Slot: 'production' # string. Required when Action != Swap Slots && SpecifySlot = true. Slot. Default: production.
#ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions.
#OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable.
#AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights.
#ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name.
# Advanced Settings
#ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.
# Azure App Service Manage v0
# Start, Stop, Restart, Slot swap, Install site extensions or Enable Continuous Monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
inputs:
azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription.
#Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
WebAppName: # string. Required. App Service name.
#SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots. Specify Slot or App Service Environment. Default: false.
#ResourceGroupName: # string. Required when Action = Swap Slots || SpecifySlot = true. Resource group.
#SourceSlot: # string. Required when Action = Swap Slots. Source Slot.
#SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots. Swap with Production. Default: true.
#TargetSlot: # string. Required when Action = Swap Slots && SwapWithProduction = false. Target Slot.
#PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots. Preserve Vnet. Default: false.
#Slot: 'production' # string. Required when Action != Swap Slots && SpecifySlot = true. Slot. Default: production.
#ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions.
#OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable.
#AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights.
#ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name.
# Advanced Settings
#ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.
azureSubscription
-
Azure 订阅
输入别名: ConnectedServiceName
。
string
. 必需。
选择 Azure 资源管理器 订阅。
Action
-
行动
string
. 允许的值:Swap Slots
、 Start Azure App Service
(Start App 服务) 、 Stop Azure App Service
(Stop App 服务) 、 Restart Azure App Service
(Restart App 服务) 、Start Swap With Preview
、 Complete Swap
(使用预览版) Cancel Swap
完成交换、 (Cancel Swap with Preview) 、、Install Extensions
Delete Slot
、Enable Continuous Monitoring
Start all continuous webjobs
、。 Stop all continuous webjobs
默认值:Swap Slots
。
可选。 定义要对App 服务执行的操作。 可以启动、停止、重启、交换槽、使用预览开始交换、使用预览完成交换、取消预览交换、安装站点扩展或为Azure 应用服务启用持续监视。
Action
-
行动
string
. 允许的值:Swap Slots
、 Start Azure App Service
(Start App 服务) 、 Stop Azure App Service
(Stop App 服务) 、 Restart Azure App Service
(Restart App 服务) 、、Install Extensions
、Enable Continuous Monitoring
Start all continuous webjobs
、 。 Stop all continuous webjobs
默认值:Swap Slots
。
可选。 定义要对App 服务执行的操作。 可以启动、停止、重启、交换槽、使用预览开始交换、使用预览完成交换、取消预览交换、安装站点扩展或为Azure 应用服务启用持续监视。
WebAppName
-
App 服务名称
string
. 必需。
输入或选择现有Azure 应用服务的名称。
SpecifySlotOrASE
-
指定槽或应用服务环境
输入别名: SpecifySlot
。
boolean
. 可选。 在 时 Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swap
使用 。 默认值:false
。
SpecifySlotOrASE
-
指定槽或应用服务环境
输入别名: SpecifySlot
。
boolean
. 可选。 在 时 Action != Swap Slots
使用 。 默认值:false
。
ResourceGroupName
-
资源组
string
. 当 Action = Swap Slots || Action = Delete Slot || SpecifySlot = true || Action = Start Swap With Preview || Action = Complete Swap || Action = Cancel Swap
时,需要此选项。
输入或选择包含上面指定的Azure 应用服务的 Azure 资源组。
ResourceGroupName
-
资源组
string
. 当 Action = Swap Slots || SpecifySlot = true
时,需要此选项。
输入或选择包含上面指定的Azure 应用服务的 Azure 资源组。
SourceSlot
-
源槽
string
. 当 Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap
时,需要此选项。
在 时 action == Swap Slots
用作源槽。 交换操作可将目标槽的流量引入源槽。
SourceSlot
-
源槽
string
. 当 Action = Swap Slots
时,需要此选项。
在 时 action == Swap Slots
用作源槽。 交换操作可将目标槽的流量引入源槽。
SwapWithProduction
-
与生产环境交换
boolean
. 可选。 在 时 Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap
使用 。 默认值:true
。
将源槽的流量与生产交换。 如果未选择此选项,则需要提供源和目标槽名称。
SwapWithProduction
-
与生产环境交换
boolean
. 可选。 在 时 Action = Swap Slots
使用 。 默认值:true
。
将源槽的流量与生产交换。 如果未选择此选项,则需要提供源和目标槽名称。
TargetSlot
-
目标槽
string
. 当 SwapWithProduction = false
时,需要此选项。
在 时 action == Swap Slots
使用 作为目标槽。 交换操作将目标槽的流量定向到源槽。
TargetSlot
-
目标槽
string
. 当 Action = Swap Slots && SwapWithProduction = false
时,需要此选项。
在 时 action == Swap Slots
使用 作为目标槽。 交换操作将目标槽的流量定向到源槽。
PreserveVnet
-
保留 Vnet
boolean
. 可选。 在 时 Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap
使用 。 默认值:false
。
保留虚拟网络设置。
PreserveVnet
-
保留 Vnet
boolean
. 可选。 在 时 Action = Swap Slots
使用 。 默认值:false
。
保留虚拟网络设置。
Slot
-
槽
string
. 当 Action = Delete Slot || Action = Cancel Swap || SpecifySlot = true
时,需要此选项。 默认值:production
。
Slot
-
槽
string
. 当 Action != Swap Slots && SpecifySlot = true
时,需要此选项。 默认值:production
。
ExtensionsList
-
安装扩展
string
. 当 Action = Install Extensions
时,需要此选项。
站点扩展在 Microsoft Azure 应用服务 上运行。 可以安装一组工具作为站点扩展,并更好地管理Azure 应用服务。 重启App 服务以使最新更改生效。
OutputVariable
-
输出变量
string
. 可选。 在 时 Action = Install Extensions
使用 。
提供所选扩展的本地安装路径的变量名称。
此字段现已弃用,将被删除。 在 LocalPathsForInstalledExtensions
后续任务中使用“输出变量”部分中的变量。
AppInsightsResourceGroupName
-
Application Insights 的资源组名称
string
. 当 Action == Enable Continuous Monitoring
时,需要此选项。
输入或选择 Application Insights 资源可用的资源组。
ApplicationInsightsResourceName
-
Application Insights 资源名称
string
. 当 Action == Enable Continuous Monitoring
时,需要此选项。
选择在其中记录连续监视数据的 Application Insights 资源。
如果此处未列出 Application Insights 资源,并且你想要创建新资源,请选择“ +新建”。 在Azure 门户中创建资源后,请返回此处并选择“刷新”。
ApplicationInsightsWebTestName
-
Application Insights Web 测试名称
string
. 可选。 在 时 Action == Enable Continuous Monitoring
使用 。
可选。 输入要创建或更新的 Application Insights Web 测试名称。
如果未提供 Web 测试名称,则使用默认测试名称。
除了任务输入,所有任务都有控制选项。 有关详细信息,请参阅 控制选项和常见任务属性。
此任务定义以下 输出变量,可在下游步骤、作业和阶段中使用。
LocalPathsForInstalledExtensions
此输入是所选扩展的本地安装路径。
如果选择多个扩展,则输出是所选的每个扩展的本地路径的逗号分隔列表。 输出按路径在“安装扩展”字段中出现的顺序列出。
使用此任务来完成启动、停止、重启、槽交换、带预览的交换、安装站点扩展或对 Azure 应用服务启用持续监视等操作。
交换两个插槽(通常是从过渡插槽交换到生产槽中)时,请确保生产槽始终是目标槽。 这样,交换操作才不会影响生产应用。
另外,在执行交换(或带预览的交换)操作期间的任何时候,初始化已交换应用的所有工作都在源槽上发生。 准备和预热源槽时,目标槽将保持联机,而不管交换是成功还是失败。
有关详细信息,请参阅设置 Azure 应用服务中的过渡环境。