Repository Notifications

In a collaborative DevOps environment, staying informed about registry activity is critical. Red Hat Quay supports event-driven notifications at the repository level, allowing administrators and automated systems to react instantly to changes during the repository lifecycle.

You can configure Quay to listen for specific Events (such as a new image push, a tag deletion, or a vulnerability discovery) and respond with various Actions (such as internal UI alerts, Emails, Slack messages, or Webhooks to trigger external CI/CD pipelines).

Creating a Push-to-Repository Event Notification

In this first exercise, we will configure a simple internal notification that alerts the repository owners within the Quay UI whenever a new image is pushed.

  1. From the Red Hat Quay Dashboard, ensure you have a repository named kafka under your olleb organization.

    (If it does not exist, click Create Repository in the top right, name it kafka, and click Create).

  2. Navigate to the olleb/kafka repository.

  3. On the top menu, click Settings.

  4. Scroll down to the Events and notifications section and click the Create Notification button.

    Create Notification Button
  5. Configure the notification parameters:

    • When this event occurs: Select Push to Repository.

      Event List
    • Then issue a notification: Select Red Hat Quay Notification.

      Notification Actions
    • Recipient: Select owners.

    • Notification title: Enter A new image has been pushed into the repository.

      Notification Configuration
  6. Click Submit to save it.

Triggering the Notification

Let’s test the configuration by pushing a new image tag to the repository.

UI Test Button vs. Real Push
You might notice a Test Notification option in the Quay UI next to your newly created event. While clicking it is useful to quickly verify network connectivity to your webhook endpoint, it only sends a mock JSON payload. To validate the actual end-to-end flow and inspect a real event payload (with genuine image tags, timestamps, and metadata), we will perform a real image push from the terminal.

  1. Pull an image, tag it, and push it to your registry:

    export QUAY_HOSTNAME=$(oc get route quay-registry-quay -n quay-workshop -o jsonpath='{.spec.host}')
    
    podman pull quay.io/strimzi/kafka:latest-kafka-3.0.0
    podman tag quay.io/strimzi/kafka:latest-kafka-3.0.0 ${QUAY_HOSTNAME}/olleb/kafka:3.0.0
    
    # Log in if you are not already authenticated
    podman login ${QUAY_HOSTNAME}
    
    podman push ${QUAY_HOSTNAME}/olleb/kafka:3.0.0
  2. After a few moments, switch back to the Quay UI. A notification bell will appear at the top of the dashboard indicating the event.

    Notification Details

Simulating a CI/CD Trigger with Webhooks

While internal UI notifications are useful for human administrators, modern automated workflows rely on external triggers. Red Hat Quay can send HTTP POST requests (Webhooks) containing rich JSON payloads to external endpoints. This is commonly used to trigger OpenShift Pipelines (Tekton), Jenkins builds, or ArgoCD syncs.

In this exercise, we will use a free webhook testing service to capture and inspect the payload Quay sends.

  1. Open a new browser tab and navigate to https://webhook.site.

  2. The site will automatically generate a unique, temporary URL for you. Click Copy to clipboard next to Your unique URL (it should look like https://webhook.site/xxxx-xxxx-xxxx).

  3. Return to the Red Hat Quay UI and navigate to the Settings > Events and notifications of your olleb/kafka repository.

    Create Notification Button
  4. Click Create Notification and configure it as follows:

    • When this event occurs: Push to Repository

    • Then issue a notification: Webhook POST

    • Webhook URL: Paste the URL you copied from webhook.site.

    • POST JSON body template: Quay allows you to customize the payload to match the exact schema expected by external tools (like Slack or Tekton). Paste the following custom JSON template:

      {
        "event_source": "Red Hat Quay",
        "alert": "New image pushed!",
        "repository": "olleb/kafka",
        "action_required": "Trigger CI/CD Pipeline"
      }
    • Title: Automated CI/CD Trigger

  5. Click Submit.

Create Notification Webhook

Inspecting the Webhook Payload

  1. From your terminal, push a new tag to the repository to trigger this new webhook:

    podman tag ${QUAY_HOSTNAME}/olleb/kafka:3.0.0 ${QUAY_HOSTNAME}/olleb/kafka:3.0.1
    podman push ${QUAY_HOSTNAME}/olleb/kafka:3.0.1
  2. Switch back to your webhook.site browser tab.

  3. You should immediately see an incoming POST request appear on the left panel.

  4. Select the request and inspect the Raw Content.

Webhook payload

_Notice that instead of Quay’s massive default payload, the webhook delivered your exact custom JSON template along with the title you specified. This powerful feature allows Quay to integrate natively with almost any third-party API without requiring middleware!_ca