To ensure that the webhook athttps://contoso.com/statushookis called every time the repository namedaz40038443478acr1receives a new version of an image nameddotnetapp, you can follow these steps to configure a webhook in Azure Container Registry:
Navigate to the Azure Container Registry:
Go to the Azure Portal.
Find and select yourAzure Container Registry instanceaz40038443478acr1.
Create a New Webhook:
UnderServices, selectWebhooks.
Click on+ Addto create a new webhook.
Fill in the form with the following information:
Webhook name: Enter a unique name for your webhook.
ServiceURI: Enterhttps://contoso.com/statushook.
Custom headers: (Optional) Add any headers you want to pass along with the POST request.
Trigger actions: SelectPushto trigger the webhook on image push events.
Scope: Specify the scope asaz40038443478acr1:dotnetappto target the specific image.
Status: Set toEnabled.
Save the Webhook Configuration:
Review the information and clickCreateto save the webhook.
Once configured, the webhook will send a POST request tohttps://contoso.com/statushookwhenever a new version of thedotnetappimage is pushed to theaz40038443478acr1repository in your Azure Container Registry1.
This setup will automate the notification process, ensuring that the specified webhook is called with each new image version, thus fulfilling the task requirements.
Submit