Azure Registry Trigger
Learn how to trigger Codefresh pipelines from Azure Registry events
It is possible to define and manage Azure Registry Pipeline triggers with the Codefresh UI.
This allows you to trigger Codefresh pipelines when an Azure Registry event happens (e.g. a new Docker image is uploaded).
Manage Azure 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 the Azure Registry that will use this URL to call Codefresh
Make sure that you have an Azure cloud account and have already created a registry.
Create a new Azure Trigger
To add a new Azure 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
- Name of Registry - put Azure name of registry (without
- Image Repository Name - Azure image repository name.
- Action - select
- Tags - 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 Azure to call this URL when an event takes place.
Setup Azure Notification
The easiest way to create an Azure trigger is with the Azure CLI (Also available in the Azure portal)
Here is the command
The name can be anything you want. The URI is the Codefresh URL that was created in the previous step.
Triggering a Codefresh pipeline with Azure push
Now, every time you push a new Docker image to the selected Azure Docker repository, manually, with Codefresh or any other CI/CD tool, Codefresh will trigger execution of all pipelines associated with that Azure Push trigger event.