Hello Darragh,
Based on my understanding your requirement is to Delay/Hold your deployment slots swap until a manual validation is performed, and then trigger a swap after successful testing on staging slot.
After your deployment stage in your YML file I would add an additional jobs/step such as below:
- job: waitForValidation
dependsOn: Deployment to your Environment
displayName: 'Wait for approval or validation to swap slots'
timeoutInMinutes: 35780
pool: server
steps:
- task: ManualValidation@0
displayName: 'Wait for approval to swap slots'
inputs:
notifyUsers:
******@xyz.com
- job: swapSlot
dependsOn: waitforValidation
steps:
- task: AzureAppServiceManager@0
inputs:
azureSubscription: 'Your Subscription Information'
Action: 'Swap Slots'
WebAppName: 'your app name'
ResourceGroupName: 'your resourcegroup name'
SourceSlot: 'slot-1'
Hope this helps to meet your requirements.
Thanks.