Background info: I have set up Azure to automatically deploy code from develop branch (on Github) to dev-webapp when code is pushed to develop branch. When code is pushed to master branch, Azure deploys code from master branch to test-webapp and pre prod-deployment slot.
In Azure I'm using New Relic Appservice to monitor these apps. It works. What I want now is to notify New Relic when code is deployed to a webapp.
Quote New Relic:
To notify New Relic of a deployment, you can POST to https://api.newrelic.com/deployments.xml and add the API key as a header
To notify New Relic when code is deployed to dev and test, I could set up webhook in GitHub to run when code is pushed to develop-branch and master-branch. I have tested this, and it works. I feel like it is not optimal since the notification comes from Github, and not from Azure which is where the deployment actually takes place.
I also want to notify New Relic when the pre-prod deploymentslot is swapped with prod.
Is it possible? And what could be the best way to do this?
Maybe webjobs could be the soulution? This should be a webjob that only runs once after webapp is deployed and deployment-slot is swapped (for prod). I cannot find any information about setting up such job.