How to trigger Codefresh pipelines from Quay
It is possible to define and manage Quay pipeline triggers with the Codefresh UI. This allows you to trigger Codefresh pipelines when a Quay event happens (e.g. a new Docker image is uploaded).
Manage Quay Triggers with Codefresh UI
The process involves two parts
- Creating a trigger in Codefresh. This will result in a special Codefresh webhook URL
- Creating a new notification in Quay that will use this URL to call Codefresh
Make sure that you have a Quay account and have already created a repository (or pushed a Docker image at least once).
Create a new Quay Trigger
To add a new Quay trigger, navigate to a Codefresh Pipeline Configuration view and expand the Triggers section. Press the
Add Trigger button and select a
Registry trigger type to add.
Fill the following information:
- Registry Provider - select
- Namespace - put Quay user name or organization name here
- Name - Quay image repository name
- Action - select
- Filter - optional filter to specify which image tags will trigger pipeline execution: Re2 regular expression
Click next and a new Dialog will appear that shows you the Codefresh webhook URL. Copy it to your clipboard.
Now we must set Quay to call this URL when an event takes place.
Setup Quay Notification
Log in your Quay account and go to the respective repository. You can also click the link shown in the Codefresh dialog to go directly to the settings of that repository.
Scroll down and under Events and Notifications click Create Notification.
In the new screen select Push to repository from the drop-down or any other event that you wish the Codefresh pipeline to trigger.
From the next dropdown choose Webhook Post. In the Webhook URL entry paste the Codefresh URL that was created in the Codefresh Trigger dialog.
Finally click Create Notification.
Triggering a Codefresh pipeline with Quay push
Now, every time you push a new Docker image to the selected Quay repository, manually, with Codefresh or any other CI/CD tool, Codefresh will trigger execution of all pipelines associated with that Quay Push trigger event.