question

villaloboskvn avatar image
0 Votes"
villaloboskvn asked villaloboskvn commented

(Docker) Container Registry Repository Webhook not updating Functions App

Brief Summary
My Functions App are not updating when I re-deploy the code via docker image on Azure Container Registry.


Details
I have a docker image repository on Azure Container Registry.

I have a Functions App on which I have several Azure functions deployed. My Functions App has the Continuous Deployment enabled.

I created a webhook on which I selected the scope xxxxxxxxazurefunctions:* in order to update the Functions App every time a new image is uploaded to the repository. On the webhook I put the URI of my Functions App.

97855-webhook.png


When I push a new image to the repository the webhook is triggered (see Figure 2). However, my Function App is not uploaded (see Figure 3).

97766-updatedtag.png

97797-functionsapp.png


Workaround:
I can manually change the image of my Azure Functions. However, I would like this to be done automatically. Is there some that I´m missing?

When I change the tag of my image on Azure Functions (manually via Azure Portal), a new webhook is created associated to the selected tag (see Figure 4). In this case, my Functions App is properly updated with the new image. Maybe have something to do with the webhook's scope?

97818-newwebhook.png




azure-functionsazure-container-registry
webhook.png (14.8 KiB)
updatedtag.png (19.9 KiB)
functionsapp.png (43.5 KiB)
newwebhook.png (13.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PramodValavala-MSFT avatar image
1 Vote"
PramodValavala-MSFT answered villaloboskvn commented

@villaloboskvn The current container is updated when a new container is pushed for the same tag. For example, if the selected tag is latest and you upload a new container with this tag, only then will it be updated.

But in production, using latest isn't really recommended and you should use versioned tags (like you already have) and then use a CI/CD pipeline to update your app service, triggering it to pick the latest.

The CD feature built into App Service is great when you don't really need a full-fledged CI/CD setup. Though it would still be best to use another tag instead of latest because you could accidently update it if you don't set a tag while building the container.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the answer!. I have made some tests and I managed to update the Functions App by uploading the image with the same tag. I have found some problems when publishing from visual studio a image with the same tag but I managed to do it from the command line.

Yeah, we are considering using a Azure Pipelines for future developments.

0 Votes 0 ·