1

I want to trigger a jenkins multi-branch pipeline based on merge requests in a gitlab repo. I checked only merge requests on Integrations->JenkinsCI in the gitlab project. But when I create a merge request to master, the pipeline is not getting triggered.

If push box is checked, the pipeline triggers as expected. I do not want to build the pipeline for every push.

Why isn't merge request trigger working? what am I doing wrong? Is there any way to trigger jenkins pipeline only when a merge request is create/updated/merged?

Gitlab JenkinsCI setting

EDIT: I realized that in the README section of gitlab-plugin repo it is mentioned that merge request hooks are ignored as below. "Due to this, the plugin just listens for GitLab Push Hooks for multibranch pipeline jobs; merge Request hooks are ignored." Does this mean merge request hooks are not supported for multibranch pipeline? Does anyone have alternative suggestions to make "merge request only" trigger work?

VishnuM
  • 53
  • 1
  • 8
  • Please refer https://stackoverflow.com/questions/52148634/how-to-add-webhooks-in-gitlab-for-multibranch-pipeline-jenkins – user_9090 Jan 03 '20 at 04:58
  • @user_9090 The answer in the post you mentioned didn't work for me. I left a comment in the post. – VishnuM Jan 03 '20 at 18:45

0 Answers0