Jenkins builds on tag pushes via gerrit-trigger plugin Jenkins builds on tag pushes via gerrit-trigger plugin jenkins jenkins

Jenkins builds on tag pushes via gerrit-trigger plugin


The Gerrit trigger plugin has several trigger options for initiating the job.

In your Jenkins job, under "Gerrit Trigger" you'll find a "Trigger On" section with a drop-down list. If you trigger on "Ref updated" it will run your job any time a developer pushes a ref directly to Gerrit without going through the review process. This won't strictly be limited to tag events, but it will catch them.


"Ref update" works but it also triggered by commit merged to master as well.If you just want to have the build been triggered by new tags. Try following step:

1, The tag should be in a form like release/xxx.xx.xx

2, Git plugin Configuration:Repository URL: ssh://xxxx@mygerrit.com:29418/sweetTest.gitBranches to build: master

3, Gerrit plugin:Select "Gerrit event"Choose "Ref updated"Fill Gerrit project Patterns: Plain: sweetTest Branches: Path: refs/tags/release/*

4, Now push a new tag "release/tagName" to remote gerrit repo master branch will trigger the build