Start Jenkins pipeline for specific tag in docker hub webhook

133 views Asked by At

I have configured my CI/CD so that the repository is integrated to Docker Hub private repo. Updates in repo will automatically trigger the dev image creation. My idea was the to use the Docker Hub webhook to start Jenkins pipeline which would take care of the rest of the deployment.

I'm using the CloudBees Docker Hub/Registry Notification. Webhook is up and running, but now the pipeline starts for every change in the Docker Hub repo. Is there way to limit the pipeline to trigger for changes to specific tag?

I guess the other way would be to handle the whole process in Jenkins, but for that I would need to handle all the builds and create separate containers to do those etc.. Though would not need to go through that.

I try to trigger a Jenkins pipeline based on changes on specific tag in Docker Hub. Now the pipeline starts with change to any tag.

1

There are 1 answers

0
Marsv On

I'm not sure I understand correctly your problem. Perhaps this can help you:

Add a filter to your source code management configuration to specify the pipeline execution only on the new or a specific tag.

Related topics to explain that: jenkins trigger build if new tag is released