4
votes

Let's assume that we have 3 different container registries. Is there any available azure devops jobs/tasks that can provide a way to trigger my build pipeline when a new image is pushed on any of these 3 registries?

I have some insights with MS Flow but i want to limit the scope on azure devops.

Find a way or recommendation to trigger the build pipeline using devops jobs/tasks.

2
What is your container registries?Shayki Abramczyk
@ShaykiAbramczyk Azure Container RegistryPANDA MAN

2 Answers

1
votes

You can create in Azure Container Registry a web hook that trigger the build in Azure DevOps when new image pushed.

For this you need to write a service with Web API that handle the API Post calls. the ACR web hook send a Post call to the service when new image is pushed.

In the service you trigger the Azure DevOps build pipeline using the Azure DevOps .Net Libraries (if the service is in C#) or with Azure DevOps Rest API.

How to create ACR Web Hook? find here.

How to trigger build pipeline from code? find here.

0
votes

you can have releases triggered with new images in the docker hub (reading). I dont think the same can be done for builds. You can create a release that would get triggered on the new image and that release would talk to the API to trigger the build.