Soru

Zorluk: OrtaManage Container Images in Azure Container Registry

A developer needs to configure an Azure Container Registry (ACR) named `registry204` to notify an external service via a webhook whenever a new container image tag is pushed. The developer must also verify that the webhook is successfully triggered by a push event. Which sequence of steps should the developer perform?

  1. 1Ensure the Azure Container Registry is configured with the Standard or Premium service tier, and obtain the target webhook destination URL.
  2. 2Run the `az acr webhook create` command, specifying the registry name, a unique webhook name, the target URL, and setting the actions parameter to `push`.
  3. 3Authenticate to the registry, tag a local container image, and run the `docker push` command to upload the image.
  4. 4Run the `az acr webhook list-events` command to review the delivery log and response status of the webhook trigger.

Cevap

First, verify that the Azure Container Registry is using either the Standard or Premium service tier and obtain the target webhook URL. Next, create the webhook with the `az acr webhook create` command, configuring it to trigger on the `push` action. Then, perform a `docker push` to upload a container image to the registry, triggering the webhook. Finally, run the `az acr webhook list-events` command to verify successful delivery of the webhook notification.
The correct order begins with verifying that the registry is Standard or Premium tier (as Basic does not support webhooks) and obtaining the target URL. Next, the webhook must be created using the `az acr webhook create` command. After the webhook is created, a container image is pushed to trigger the webhook. Finally, the event delivery is verified by running the `az acr webhook list-events` command.

Adım Adım Çözüm

1
Verify the ACR service tier and obtain the webhook destination URL.
The registry is verified to be on a supported tier (Standard or Premium) and the target URL is ready.
ACR webhooks are only available in the Standard and Premium service tiers; they are not supported in the Basic tier.
2
Register the webhook in ACR using the Azure CLI.
A webhook is created in the registry configured to trigger on the `push` action.
The webhook must exist in the registry prior to the push event to capture and forward the trigger.
3
Push a container image to the registry.
The container image is uploaded, triggering the webhook.
Uploading the image triggers the webhook since it was configured to monitor the `push` action.
4
Verify webhook delivery using the CLI.
Webhook invocation logs and status codes are displayed.
The `az acr webhook list-events` command provides the delivery history and response codes from the target API.

Anahtar Kavram

Configuring and verifying webhooks in Azure Container Registry (ACR) to respond to image push events.
Bu soruyu puanla