davidpaquipalla davidpaquipalla - 1 month ago 8
Git Question

Jenkins and Gitlab: Webhook isn't running

I have a couple of servers:


  1. Jenkins

  2. Gitlab



On gitlab, I have a webhook:

On Push events -> http://{jenkinsIP}:8080/gitlab/build_now


On Jenkins, I have a job:


Source Code Management:

Git:

Repository URL : git@{GitlabIP}:{Gitlabgroup}/{project}.git (copy from gitlab)


Credential: key-pair working

Branches to build: */master

Repository browser: gitlab

url: http://{GitlabIP}/{Gitlabgroup}/{project}


Version: 6.5.1

Poll SCM

Schedule H/1 * * * *



Any clue why Jenkins isn't running the job?

Answer

On Jenkins, you should disable "Poll SCM" and set the "Branches to build" to "master" (not "*/master")