Azure Deployment Slot Swap Scheduling

95 Views Asked by At

I have an app service with two deployment slots: Production and Test. My current flow is that I push my changes to Devops, the build kicks off, and a release is created in Test.

I can then go to the Test url, do some testing, and when ready, I can swap the two slots.

What I would like to do is schedule a time for a swap so it's automated at say, 2 or 3 am when traffic is almost nil. Is there a way to automate the swap either through the interface (99% sure that's not available) or through a script that gets triggered somehow?

1

There are 1 best solutions below

4
Vicky On

Deployed .NET Web App to the Azure App Service having deployment slots - Staging and Production.

In Pre-deployment Conditions > Triggers > Schedule - Monday to Friday at 6 AM is set.

I have created the release and the production slot is evaluated after staging slot deployment and scheduled time:

enter image description here

You have to set the schedule on Pre-deployment conditions of the Prod Slot in the Release Pipeline:

enter image description here

Result:

enter image description here

Updated Answer:

enter image description here

Changed Prod Slot Functionality from deployment to Swap Slots.

enter image description here

Schedule worked for the Swap Slots Stages in release Pipeline.