Adrian Andreias

Jul 22, 2014

Jenkins build triggered from Gitlab

You'll want to trigger automatic builds whenever a commit is made in Gitlab. Here's a quick way to do it:

  1. You need to have the Jenkins git plugin installed
  2. Enable polling: Jenkins > project > "Configure" > check ">Poll SCM"
  3. In Gitlab on the project's "Settings" page go to "Web hooks" and add a new hook by filling this address:
http://<<jenkins server>>/git/notifyCommit?url=git@<<git server>>:<<user or group>>/<<project>>.git

I've selected "Push events", "Tag push events" and "Merge Request events"

You can debug any issues by the "Git Polling Log" link in the left menu from the Jenkins project page.