These days I am trying to configure a Jenkins job which will be triggered by tag added to remote branch. Following are the steps what I did:
Added hook on github side and set the event to "Branch or tag creation" (I can see the hook is correctly triggered on github (enterprise version)).
Create freestyle jenkins job (pipeline should be similar), in the git section configure git as below.
Check "triggers "GitHub hook trigger for GITScm polling" in Build triggers section
Then I try to change something and add tag to branch, and push to remote. But still cannot trigger the job run on Jenkins automatically. I have searched a lot but still cannot make this work. But when I change the event to "Pushes" on github side (others keep the same), then the job can be triggered.
Anyone have the idea? Thanks.
And how about Jenkin2 pipeline? No git section in job configuration.