DEV Community

Cover image for Azure Pipelines Triggers - Container Registry
Davide 'CoderDave' Benvegnù
Davide 'CoderDave' Benvegnù

Posted on • Updated on

Azure Pipelines Triggers - Container Registry

As you probably know, Azure Pipelines supports many types of triggers, and sometimes it may be a little confusing.

This is why I've decided to create this mini-series dedicated to Triggers. And today we are going to talk about the Container Registry trigger, which allows to you run a Pipeline every time a new container image is pushed to Azure Container Registry and Docker Hub.

Classic vs YAML

I'll focus first on the Classic Release Pipelines, using the UI, because setting up the trigger is easier and it supports both the Azure Container Registry and Docker Hub.

For the Multistage YAML Pipelines, instead, we can achieve almost the same using the YAML triggers, but the trigger is currently available only if you're using Azure Container Registry. It is not available for Docker Hub. But stay with me until the end because I have a workaround for you for triggering from Docker Hub.

To be able to trigger a Pipeline run whenever a new container image is pushed to your registry, we need to use a Resource. If you are not familiar with Resources, they are basically anything used by a pipeline that lives outside the pipeline.

Those can be other pipelines, repositories, packages and of course containers images.

The Video

Enjoy the watch!

Conclusion

I think that this is pretty cool, especially now that a lot of developers have their applications containerized.

And being able to trigger also from Docker Hub, as I've shown, it is pretty handy.

What do you think? How do you trigger your deployments of container images?

References and Links

Like, share and follow me 🚀 for more content:

YouTube
Patreon
Merch
Facebook page
GitHub
Twitter
LinkedIn
Podcast

Top comments (0)