Table of Contents

Class AppServiceOperations

Namespace
Ando.Operations
Assembly
ando.dll

Provides Azure App Service deployment operations for build scripts. Methods register steps in the workflow rather than executing immediately.

public class AppServiceOperations : OperationsBase
Inheritance
AppServiceOperations
Inherited Members

Constructors

AppServiceOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>)

Provides Azure App Service deployment operations for build scripts. Methods register steps in the workflow rather than executing immediately.

public AppServiceOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory)

Parameters

registry StepRegistry
logger IBuildLogger
executorFactory Func<ICommandExecutor>

Methods

CreateSlot(string, string, string?, string?)

Registers a step to create a new deployment slot.

public void CreateSlot(string appName, string slotName, string? resourceGroup = null, string? configurationSource = null)

Parameters

appName string

Name of the Azure App Service.

slotName string

Name for the new slot.

resourceGroup string

Optional resource group name.

configurationSource string

Optional slot to clone configuration from.

DeleteSlot(string, string, string?)

Registers a step to delete a deployment slot.

public void DeleteSlot(string appName, string slotName, string? resourceGroup = null)

Parameters

appName string

Name of the Azure App Service.

slotName string

Name of the slot to delete.

resourceGroup string

Optional resource group name.

DeployWithSwap(string, string, string, string?)

Registers a step to deploy to a specific slot and then swap to production. This enables zero-downtime deployments.

public void DeployWithSwap(string appName, string zipPath, string slotName = "staging", string? resourceGroup = null)

Parameters

appName string

Name of the Azure App Service.

zipPath string

Path to the deployment zip file.

slotName string

Staging slot name (defaults to "staging").

resourceGroup string

Optional resource group name.

DeployZip(string, string, string?, Action<AppServiceDeployOptions>?)

Registers a step to deploy an app service using zip deploy. Requires the app service to already exist in Azure.

public void DeployZip(string appName, string zipPath, string? resourceGroup = null, Action<AppServiceDeployOptions>? configure = null)

Parameters

appName string

Name of the Azure App Service.

zipPath string

Path to the deployment zip file.

resourceGroup string

Optional resource group name. If null, Azure CLI will determine it.

configure Action<AppServiceDeployOptions>

Optional configuration for deployment options.

ListSlots(string, string?)

Registers a step to list deployment slots for an app service.

public void ListSlots(string appName, string? resourceGroup = null)

Parameters

appName string

Name of the Azure App Service.

resourceGroup string

Optional resource group name.

Restart(string, string?, string?)

Registers a step to restart an app service.

public void Restart(string appName, string? resourceGroup = null, string? slot = null)

Parameters

appName string

Name of the Azure App Service.

resourceGroup string

Optional resource group name.

slot string

Optional slot name. If null, restarts the production slot.

Show(string, string?)

Registers a step to show app service information.

public void Show(string appName, string? resourceGroup = null)

Parameters

appName string

Name of the Azure App Service.

resourceGroup string

Optional resource group name.

Start(string, string?, string?)

Registers a step to start an app service.

public void Start(string appName, string? resourceGroup = null, string? slot = null)

Parameters

appName string

Name of the Azure App Service.

resourceGroup string

Optional resource group name.

slot string

Optional slot name. If null, starts the production slot.

Stop(string, string?, string?)

Registers a step to stop an app service.

public void Stop(string appName, string? resourceGroup = null, string? slot = null)

Parameters

appName string

Name of the Azure App Service.

resourceGroup string

Optional resource group name.

slot string

Optional slot name. If null, stops the production slot.

SwapSlots(string, string, string?, string)

Registers a step to swap deployment slots.

public void SwapSlots(string appName, string sourceSlot, string? resourceGroup = null, string targetSlot = "production")

Parameters

appName string

Name of the Azure App Service.

sourceSlot string

Source slot name to swap from.

resourceGroup string

Optional resource group name.

targetSlot string

Target slot name (defaults to "production").