2

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:

  1. 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)).

  2. Create freestyle jenkins job (pipeline should be similar), in the git section configure git as below. git conf

  3. 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. enter image description here

TangHongWan
  • 645
  • 1
  • 6
  • 18
  • Possible duplicate with https://stackoverflow.com/questions/29742847/jenkins-trigger-build-if-new-tag-is-released/38998214 – Pavel Anikhouski Apr 13 '19 at 09:42
  • @PavelAnikhouski I also found this link and tried every configuration. But none does work. Maybe the Jenkins version are different (jenkins version is old in the link, and I am using version 2.164). – TangHongWan Apr 13 '19 at 10:15
  • BTW, I also tried pipeline job. And pipeline job even has no Git inputs as shown in the freestyle screenshot, it only has *Build Triggers* section. – TangHongWan Apr 13 '19 at 10:18

0 Answers0