Currently the Azure App Service task supports the Swap action, but not the "Swap With Preview"/"Complete Swap" actions.
https://docs.microsoft.com/en-us/azure/app-service/web-sites-staged-publishing#swap-with-preview-multi-phase-swap
@bvirkler - We appreciate you taking the time to report this problem. We are currently prioritizing problems that are impacting a broad set of our customers, so we may not be able to take this one immediately. We know this problem is important to you, so we will continue to monitor it.
We also encourage contributions, feel free to submit a PR with the changes.
This would be a great addition. Particularly when combined with an agent less phase with a manual intervention step. Agent phase could do the "Swap with Preview", lead on to a manual intervention task to confirm everything looks good before using the "Swap with Preview" task again to complete the swap.
I would also love to see this addition to the DevOps tasks. The ability to reduce the slowdown or downtime when deploying using slots (with preview) would be very beneficial.
Presumably a poor man's version of this could be to deploy to a canary slot with a very small percentage of users on (0.00001%!), hit this with a smoke test or whatever you need to warm the caches, do some monitoring on it if required, then use a simple az script to finish the process:
I came looking for this feature. Disappointed it is not yet available.
Also surprised this feature is not available out of the box as a task? I guess the same could be accomplished with Azure Powershell tasks?
For anyone wanting to know how to configure it using Azure Powershell tasks:
An Azure Powershell task:
Switch-AzureRmWebAppSlot -ResourceGroupName "$(ResourceGroupName)"
-Name "$(AppName)"
-SourceSlotName "staging"
-DestinationSlotName "production"
-SwapWithPreviewAction ApplySlotConfig
Do warmup on the staging slot
Another Azure Powershell task:
Switch-AzureRmWebAppSlot -ResourceGroupName "$(ResourceGroupName)"
-Name "$(AppName)"
-SourceSlotName "staging"
-DestinationSlotName "production"
-SwapWithPreviewAction CompleteSlotSwap
Thanks everyone for reaching out. Really appreciate your time and feedback.
We have now added this feature to our backlog and would be prioritizing it very soon. Thanks again for helping us improve our product.
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days
Most helpful comment
For anyone wanting to know how to configure it using Azure Powershell tasks:
An Azure Powershell task:
Switch-AzureRmWebAppSlot -ResourceGroupName "$(ResourceGroupName)" -Name "$(AppName)" -SourceSlotName "staging" -DestinationSlotName "production" -SwapWithPreviewAction ApplySlotConfigDo warmup on the staging slot
Another Azure Powershell task:
Switch-AzureRmWebAppSlot -ResourceGroupName "$(ResourceGroupName)" -Name "$(AppName)" -SourceSlotName "staging" -DestinationSlotName "production" -SwapWithPreviewAction CompleteSlotSwap