How can I get/build the an App Service's web hook URL? #3352
-
I would like to create a web hook with my container registry that calls Creating the web hook is straight forward. But I am struggling to receive the password from app service. I have learned that the publishing profile holds the password and that there is a property called However how can I retrieve the password from the app service? There is no corresponding property like
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I am not sure how easy this will be via templates, since i believe this require a POST method. Get the creds in json: Get the whole xml published profile: The first one has "scmUri" which is the base URI string that you are looking for to create the webhook.
The only workaround I can think of it using a DeploymentScript to execute a az cli OR PowerShell command to retrieve this OR the REST POST as listed above. Whichever system you are calling the webhook from for your CI, can perhaps retrieve that directly via command line prior to calling the webhook. Another option maybe to enable Continuous Deployment directly on the WebApp? ... however I am not familiar enough with that service for containers to know if it polls the registry outwards for changes, although I guess it might be worth looking into. |
Beta Was this translation helpful? Give feedback.
-
Okay after all of that, list* does work here. You should be able to use the following to retrieve the scmuri via list. resource publishingcreds 'Microsoft.Web/sites/config@2021-01-01' existing = {
name: 'myWebSite/publishingcredentials'
}
output scmuri string = list(publishingcreds.id,'2021-01-01').properties.scmUri
You can then use that to add the webhook in the ACR .. via the serviceURI. |
Beta Was this translation helpful? Give feedback.
Okay after all of that, list* does work here.
You should be able to use the following to retrieve the scmuri via list.
You can then use that to add the webhook in the ACR .. via the serviceURI.
https://docs.microsoft.com/en-us/azure/templates/microsoft.containerregistry/2020-11-01-preview/registries/webhooks?tabs=bicep