I have a pipeline that publishes to my private Azure container registry but if I push a new image tagged with latest
, my Azure app service does not pull the newly tagged latest
image. I have Continuous deployment
turned on via the DOCKER_ENABLE_CI
app setting.
Additionally, I’m using a managed identity to authenticate with the ACR. I feel like the CD portion was working when I was using credentials to pull the image but after switching to managed identity it appears to have stopped. In order to get the new image I have to restart the app service which is not idea and makes this CD option useless…
2
Answers
Because I am an owner of the subscription I have permissions that allow the webhook to get created automatically if I manually set it up in the 'Deployment center' tab. But since my service principal is pretty locked down it doesn't have that same permissions thus the webhook can't get created. Instead I gave my SP explicit access to contribute to that ACR to create the webhook and in my Terraform code I can create the webhook. Credit goes to someone on Github who posted a way to create the service url.
My solution:
When you enable
Continuous deployment,
App Service adds a webhook to your ACR to notify the web apps. The webhook causes your App Service app to restart and run the docker pull to get the updated image.So, please go to your ACR, and under webhook, please check if there are running webhooks or not, if not you can create a webhook manually and see if the WebApp get the latest image in the following deployment.
source