Azure App Service Manage task

Azure Pipelines

Use this task in a build or release pipeline to start, stop, restart, slot swap, install site extensions, or enable continuous monitoring for an Azure App Service.

YAML snippet

# Azure App Service Manage
# Start, Stop, Restart, Slot swap, Install site extensions or Enable Continuous Monitoring for an Azure App Service
- task: AzureAppServiceManage@0
  inputs:
    azureSubscription: 
    #action: 'Swap Slots' # Optional. Options: 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
    webAppName: 
    #specifySlotOrASE: false # Optional
    #resourceGroupName: # Required when action == Swap Slots || SpecifySlot == True
    #sourceSlot: # Required when action == Swap Slots
    #swapWithProduction: true # Optional
    #targetSlot: # Required when action == Swap Slots && SwapWithProduction == False
    #preserveVnet: false # Optional
    #slot: 'production' # Required when action != Swap Slots && SpecifySlot == True
    #extensionsList: # Required when action == Install Extensions
    #outputVariable: # Optional
    #appInsightsResourceGroupName: # Required when action == Enable Continuous Monitoring
    #applicationInsightsResourceName: # Required when action == Enable Continuous Monitoring
    #applicationInsightsWebTestName: # Optional

Arguments

ArgumentDescription
Azure subscription(Required) Select the Azure Resource Manager subscription
Action(Optional) Action to be performed on the App Service. You can Start, Stop, Restart, Slot swap, Install site extensions or enable Continuous Monitoring for an Azure App Service
App Service name(Required) Enter or select the name of an existing Azure App Service
Specify Slot or App Service Environment(Optional) undefined
Resource group(Required) Enter or Select the Azure Resource Group that contains the Azure App Service specified above
Source Slot(Required) The swap action directs destination slot's traffic to the source slot
Swap with Production(Optional) Select the option to swap the traffic of source slot with production. If this option is not selected, then you will have to provide source and target slot names.
Target Slot(Required) The swap action directs destination slot's traffic to the source slot
Preserve Vnet(Optional) Preserve the Virtual network settings
Slot(Required) undefined
Install Extensions(Required) Site Extensions run on Microsoft Azure App Service. You can install set of tools as site extension and better manage your Azure App Service. The App Service will be restarted to make sure latest changes take effect.
Output variable(Optional) Provide the variable name for the local installation path for the selected extension.
This field is now deprecated and would be removed. Use LocalPathsForInstalledExtensions variable from Output Variables section in subsequent tasks.
Resource Group name for Application Insights(Required) Enter or Select resource group where your application insights resource is available
Application Insights resource name(Required) Select Application Insights resource where continuous monitoring data will be recorded.
If your application insights resource is not listed here and you want to create a new resource, click on [+New] button. Once the resource is created on Azure Portal, come back here and click on refresh button.
Control options

Open source

This task is open source on GitHub. Feedback and contributions are welcome.