Trigger pipeline from external repository and/or docker-hub

Is there any pattern for reverse of downstream plugin?

Use case:
An external Git repository contains a Docker file that the owning organisation builds and publishes resulting image to Docker hub.
I have own project that builds on top of said image.

My project pipeline should be triggered when upstream Docker file changes or it gets published to Docker hub.

Is there existing ways of achieving this?

You would typically modify the pipeline for your upstream project so that it triggers pipeline execution on your downstream repository when the file changes. If you do not control the upstream repository and cannot modify its pipeline, you will need to find a workaround (as Drone does not support any form of repository polling).

The recommended approach would be to create a small cron job / shell script that polls the upstream repository for changes, and then when a change is detected, uses the Drone API or CLI to create a build.

1 Like