Muokkaa

Jaa


AzureAppServiceManage@0 - Azure App Service manage v0 task

Start, stop, restart, slot swap, slot delete, install site extensions, or enable continuous monitoring for an Azure App Service.

Start, stop, restart, slot swap, install site extensions, or enable continuous monitoring for an Azure App Service.

Syntax

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

Inputs

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

Selects the Azure Resource Manager subscription.


Action - Action
string. Allowed values: Swap Slots, Start Azure App Service (Start App Service), Stop Azure App Service (Stop App Service), Restart Azure App Service (Restart App Service), Start Swap With Preview, Complete Swap (Complete Swap With Preview), Cancel Swap (Cancel Swap With Preview), Delete Slot, Install Extensions, Enable Continuous Monitoring, Start all continuous webjobs, Stop all continuous webjobs. Default value: Swap Slots.

Optional. Defines the action to perform on the App Service. You can start, stop, restart, slot swap, start swap with a preview, complete swap with a preview, cancel swap with a preview, install site extensions, or enable continuous monitoring for an Azure App Service.


Action - Action
string. Allowed values: Swap Slots, Start Azure App Service (Start App Service), Stop Azure App Service (Stop App Service), Restart Azure App Service (Restart App Service), Install Extensions, Enable Continuous Monitoring, Start all continuous webjobs, Stop all continuous webjobs. Default value: Swap Slots.

Optional. Defines the action to perform on the App Service. You can start, stop, restart, slot swap, start swap with a preview, complete swap with a preview, cancel swap with a preview, install site extensions, or enable continuous monitoring for an Azure App Service.


WebAppName - App Service name
string. Required.

Enters or selects the name of an existing Azure App Service.


SpecifySlotOrASE - Specify Slot or App Service Environment
Input alias: SpecifySlot. boolean. Optional. Use when Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swap. Default value: false.


SpecifySlotOrASE - Specify Slot or App Service Environment
Input alias: SpecifySlot. boolean. Optional. Use when Action != Swap Slots. Default value: false.


ResourceGroupName - Resource group
string. Required when Action = Swap Slots || Action = Delete Slot || SpecifySlot = true || Action = Start Swap With Preview || Action = Complete Swap || Action = Cancel Swap.

Enters or selects the Azure Resource Group that contains the Azure App Service specified above.


ResourceGroupName - Resource group
string. Required when Action = Swap Slots || SpecifySlot = true.

Enters or selects the Azure Resource Group that contains the Azure App Service specified above.


SourceSlot - Source Slot
string. Required when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap.

Used as source slot when action == Swap Slots. The swap action directs destination slot's traffic to the source slot.


SourceSlot - Source Slot
string. Required when Action = Swap Slots.

Used as the source slot when action == Swap Slots. The swap action directs destination slot's traffic to the source slot.


SwapWithProduction - Swap with Production
boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Default value: true.

Swaps the traffic of the source slot with production. If you don't select this option, then you need to provide the source and target slot names.


SwapWithProduction - Swap with Production
boolean. Optional. Use when Action = Swap Slots. Default value: true.

Swaps the traffic of the source slot with production. If you don't select this option, then you need to provide the source and target slot names.


TargetSlot - Target Slot
string. Required when SwapWithProduction = false.

Use as the destination slot when action == Swap Slots. The swap action directs the destination slot's traffic to the source slot.


TargetSlot - Target Slot
string. Required when Action = Swap Slots && SwapWithProduction = false.

Use as the destination slot when action == Swap Slots. The swap action directs the destination slot's traffic to the source slot.


PreserveVnet - Preserve Vnet
boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Default value: false.

Preserves the virtual network settings.


PreserveVnet - Preserve Vnet
boolean. Optional. Use when Action = Swap Slots. Default value: false.

Preserves the virtual network settings.


Slot - Slot
string. Required when Action = Delete Slot || Action = Cancel Swap || SpecifySlot = true. Default value: production.


Slot - Slot
string. Required when Action != Swap Slots && SpecifySlot = true. Default value: production.


ExtensionsList - Install Extensions
string. Required when Action = Install Extensions.

Site extensions run on Microsoft Azure App Service. You can install a set of tools as a site extension and better manage your Azure App Service. Restart the App Service so the latest changes take effect.


OutputVariable - Output variable
string. Optional. Use when Action = Install Extensions.

Provides the variable name for the selected extension's local installation path.

This field is now deprecated and will be removed. Use the LocalPathsForInstalledExtensions variable from the Output Variables section in subsequent tasks.


AppInsightsResourceGroupName - Resource Group name for Application Insights
string. Required when Action == Enable Continuous Monitoring.

Enters or selects the resource group where your Application Insights resource is available.


ApplicationInsightsResourceName - Application Insights resource name
string. Required when Action == Enable Continuous Monitoring.

Selects the Application Insights resource where continuous monitoring data is recorded.

If your Application Insights resource is not listed here and you want to create a new resource, select +New. Once you create the resource in the Azure portal, come back here and select Refresh.


ApplicationInsightsWebTestName - Application Insights web test name
string. Optional. Use when Action == Enable Continuous Monitoring.

Optional. Enters the Application Insights web test name you want to create or update.

If you don't provide a web test name, the default test name is used.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

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

LocalPathsForInstalledExtensions
This input is the local installation paths for the extensions you select.

If you select multiple extensions, the output is a comma-separated list of local paths for each of the extensions you select. The output lists the paths in the order they appear in the Install Extensions field.

Remarks

Use this task to start, stop, restart, slot swap, Swap with Preview, install site extensions, or enable continuous monitoring for an Azure App Service.

What happens during a swap

When you swap two slots (usually from a staging slot into the production slot), make sure that the production slot is always the target slot. This way, the swap operation doesn't affect your production app.

Also at any point of the swap (or swap with preview) operation, all work of initializing the swapped apps happens on the source slot. The target slot remains online while the source slot is being prepared and warmed up, regardless of where the swap succeeds or fails.

For more information, see Set up staging environments in Azure App Service.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.102.0 or greater
Task category Deploy