I want to build the latest git tag in a Jenkins pushed to a git (GitLab) repository. A web hook for tag pushes is configured and working.

My current try is to setup a parametrized Jenkins job, so it lists me the tags in a git repostiory: Git Parameters Configuration. I don't get some things working: Trigger a build on a tag push. And automatically building this tag.

Since I found nothing on the web or in the Jenkins docs, that helps me implementing this, maybe someone here can help?



I think you can use Jenkins GitLab plugin. This plugin adds an option to your jobs to "Build when a change is pushed to GitLab" and gives URL for Gitlab webhook.

So, when you setup your webhook in Gitlab and create Jenkins job, Gitlab will be triggered after creating and pushing tag to your repository and will call Jenkins with the provided URL. Jenkins jobs will be triggered and job will start.

  • As I wrote in my question, the hook is not the problem. It's already working via the GitLab Web Hooks plugin. It builds branches for me. What I want now is build pushed tags. – Michael W Apr 28 '16 at 14:01
  • @MichaelW after installing GitLab Plugin for Jenkins you will have option "Build when a change is pushed to GitLab" in Build triggers section – toshyak Apr 28 '16 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.