Chapter 9. Repository Notifications
Red Hat Quay supports adding notifications to a repository for various events that occur in the repository’s lifecycle.
9.1. Creating notifications Copy linkLink copied to clipboard!
Use the following procedure to add notifications.
Prerequisites
- You have created a repository.
- You have administrative privileges for the repository.
Procedure
Navigate to a repository on Red Hat Quay.
- In the navigation pane, click Settings.
- In the Events and Notifications category, click Create Notification to add a new notification for a repository event. You are redirected to a Create repository notification page.
On the Create repository notification page, select the drop-down menu to reveal a list of events. You can select a notification for the following types of events:
- Push to Repository
- Dockerfile Build Queued
- Dockerfile Build Started
- Dockerfile Build Successfully Completed
- Docker Build Cancelled
- Package Vulnerability Found
After you have selected the event type, select the notification method. The following methods are supported:
- Quay Notification
- Webhook POST
- Flowdock Team Notification
- HipChat Room Notification
Slack Room Notification
Depending on the method that you choose, you must include additional information. For example, if you select E-mail, you are required to include an e-mail address and an optional notification title.
- After selecting an event and notification method, click Create Notification.
9.2. Repository events description Copy linkLink copied to clipboard!
The following sections detail repository events.
9.2.1. Repository Push Copy linkLink copied to clipboard!
A successful push of one or more images was made to the repository:
9.2.2. Dockerfile Build Queued Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build that has been queued into the Build system.
Responses can differ based on the use of optional attributes.
9.2.3. Dockerfile Build started Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build that has been queued into the Build system.
Responses can differ based on the use of optional attributes.
9.2.4. Dockerfile Build successfully completed Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build that has been successfully completed by the Build system.
This event occurs simultaneously with a Repository Push event for the built image or images.
9.2.5. Dockerfile Build failed Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build that has failed.
9.2.6. Dockerfile Build cancelled Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build that has been cancelled.
9.2.7. Vulnerability detected Copy linkLink copied to clipboard!
The following example is a response from a Dockerfile Build has detected a vulnerability in the repository.
9.3. Notification actions Copy linkLink copied to clipboard!
9.3.1. Notifications added Copy linkLink copied to clipboard!
Notifications are added to the Events and Notifications section of the Repository Settings page. They are also added to the Notifications window, which can be found by clicking the bell icon in the navigation pane of Red Hat Quay.
Red Hat Quay notifications can be setup to be sent to a User, Team, or the organization as a whole.
9.3.2. E-mail notifications Copy linkLink copied to clipboard!
E-mails are sent to specified addresses that describe the specified event. E-mail addresses must be verified on a per-repository basis.
9.3.3. Webhook POST notifications Copy linkLink copied to clipboard!
An HTTP POST
call is made to the specified URL with the event’s data. For more information about event data, see "Repository events description".
When the URL is HTTPS, the call has an SSL client certificate set from Red Hat Quay. Verification of this certificate proves that the call originated from Red Hat Quay. Responses with the status code in the 2xx
range are considered successful. Responses with any other status code are considered failures and result in a retry of the webhook notification.
9.3.4. Flowdock notifications Copy linkLink copied to clipboard!
Posts a message to Flowdock.
9.3.5. Hipchat notifications Copy linkLink copied to clipboard!
Posts a message to HipChat.
9.3.6. Slack notifications Copy linkLink copied to clipboard!
Posts a message to Slack.