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
registryStepRegistryloggerIBuildLoggerexecutorFactoryFunc<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
appNamestringName of the Azure App Service.
slotNamestringName for the new slot.
resourceGroupstringOptional resource group name.
configurationSourcestringOptional 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
appNamestringName of the Azure App Service.
slotNamestringName of the slot to delete.
resourceGroupstringOptional 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
appNamestringName of the Azure App Service.
zipPathstringPath to the deployment zip file.
slotNamestringStaging slot name (defaults to "staging").
resourceGroupstringOptional 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
appNamestringName of the Azure App Service.
zipPathstringPath to the deployment zip file.
resourceGroupstringOptional resource group name. If null, Azure CLI will determine it.
configureAction<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
Restart(string, string?, string?)
Registers a step to restart an app service.
public void Restart(string appName, string? resourceGroup = null, string? slot = null)
Parameters
appNamestringName of the Azure App Service.
resourceGroupstringOptional resource group name.
slotstringOptional 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
Start(string, string?, string?)
Registers a step to start an app service.
public void Start(string appName, string? resourceGroup = null, string? slot = null)
Parameters
appNamestringName of the Azure App Service.
resourceGroupstringOptional resource group name.
slotstringOptional 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
appNamestringName of the Azure App Service.
resourceGroupstringOptional resource group name.
slotstringOptional 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")