I have automated deployment of ASP.NET MVC app which uses NewRelic for performance profiling to azure using MSBuild and WebDeploy.
I have used waws-prod-blu-001.publish.azurewebsites.windows.net:443 url for deployment as it was mentioned in publish profile. Also I stop my website before deployment and start after as NewRelic locks some log files so deployment fails. This is official workaround mentioned in NewRelic documentation.
Usually deployment takes 2-3 minutes. However last days deployment started taking more than 30 minutes and fails from time to time. I have downloaded new publish profile and noticed that WebDeploy url was changed to KUDU url ({my-app}.scm.azurewebsites.net:443). After updating url deployment takes 2-3 minutes as usual. However when I stop website KUDU is also not accessible and I cannot do deployment.
My question is: how can I do deployment of Azure website which uses NewRelic via KUDU when NewRelic requires website to be stopped while deployment and KUDU requires website running for deployment. Any other way of deployment are also acceptable.
I have already tried next things:
1) Deploy via FTP is also very, very slow as it uses the same url (ftps://waws-prod-blu-001.publish.azurewebsites.windows.net/).
2) Restaring website before deployment doesn't help. NewRelic still locks some log file.