When releasing the build in VSO, I would like to release it in a webapp staging slot. I'm using NewRelic, so I have to stop the staging environment, and set AlwaysOn option to false, before deployment, then put it on and start after deployment.
This is what I'm doing using Azure CLI task before the deployment task :
call azure webapp config set --slot staging Default-Web-WestEurope instanceName --alwayson false
call azure webapp stop --slot staging Default-Web-WestEurope instanceName
It works well when I launch these commands on Azure CLI on my own desktop. But when I put this script on Azure CLI Task on VSO, it works... but on the production slot.
It's very annoying because it put the production down.
Do you know how to update WebApp slot configuration in VSO continuous integration ?