loading...
Cover image for Azure Pipelines Triggers - Container Registry

Azure Pipelines Triggers - Container Registry

n3wt0n profile image Davide Benvegnù ・2 min read

Pipelines Triggers (2 Part Series)

1) Azure Pipelines Triggers - Container Registry 2) Azure Pipelines Triggers - Schedule

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

Pipelines Triggers (2 Part Series)

1) Azure Pipelines Triggers - Container Registry 2) Azure Pipelines Triggers - Schedule

Posted on by:

n3wt0n profile

Davide Benvegnù

@n3wt0n

DevOps Architect @ Microsoft. C# coder. Azure expert. MMA fighter. Not in that order.

Discussion

markdown guide