jenkinsci / gitlab-hook-plugin

Deprecated, see https://www.jenkins.io/jep/7
133 stars 42 forks source link

Cann't trigger a build by merge request hook. #50

Open qwertyI opened 6 years ago

qwertyI commented 6 years ago

Hi, guys:

I had added http://jenkins_server/gitlab/build_now to Gitlab and add push events and merge request events.

When I push a new code to Gitlab, the hook will trigger my Jenkins job. But when I create a merge request in Gitlab, there had happened nothing.

I don't know what's up. There anyone has the experience?

Jenkins version: 2.7.1 Gitlab version: 10.4.0 & 7.11.4 Gitlab Hook Plugin: 1.4.2

HadesArchitect commented 6 years ago

Jenkins logs would be nice to see, the plugin produces some useful logs to check.

About your question:

  1. Notice that the merge request should has a target branch which matches your job branch. For example, if you make a merge request from branch feature-1234 to master branch, you need a job which works with branch master
  2. Assure that creation of merge requests jobs is enabled in jenkins config.
LHRchina commented 5 years ago

I have the same problem

Jenkins version: 2.122 Gitlab version: 11.4.7-ee Gitlab Hook Plugin: 1.4.2

the push events trigger logs are

`Dec 29, 2018 3:38:00 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling INFO: matching projects:

and the create a merge request trigger logs are :

`Dec 29, 2018 3:41:42 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling INFO: matching projects:

the INfO line is empty

My jenkins config is: image