Description
I have Jenkins (2.126) set up to build a pipeline when a new tag is pushed. Specifically, I want to tag an existing commit on master
as release-3
and have it trigger a build. According to several sources, what I want is possible:
https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/136740885/Triggering+Jenkins+Based+on+New+Tags
Unfortunately, nothing happens when I tag an existing commit and push it to the Git repository. Other builds (triggered by branches) work as expected, and the tag-triggered build in question completes successfully when started manually.
According to some, tag-triggered pipelines should work since version 2.3. Is there anything I can configure to make it work?
Screenshots of attempts
Attempt with a normal pipeline polling at * * * * *
:
Attempt with a multibranch pipeline, scanning every 1 minute
:
Related issues
I found the following issues related to the problem, which is supposed to be resolved.
You can use Generic Webhook Trigger Plugin.
In GitHub:
In Jenkins:
Now when a tag is pushed to the repo this job will trigger.
You may also want to pick other values from the webhook like $.repository.ssh_url to get the SSH clone URL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With