0
votes

I can't find a way to trigger builds on jenkins when a gitlab merge request get accepted.

Here is my job configuration :

jenkins version : Jenkins ver. 2.107.3 gitlab version : 11.2.3

enter image description here

enter image description here

enter image description here

enter image description here

My webhook configuration on gitlab :

enter image description here

I tried, to select push events and accepted MR events on jenkins side, it works but for each push ! I want to know if this is the only way to get that works (push + accepted MR events). Logically i just have to select accepted Mr only, but i get nothing, it doesn't seems to work that way.

I checked jenkins issues and find this one, i don't know if this is the same issue ? https://github.com/jenkinsci/gitlab-plugin/issues/636

Can you help me please, any ideas ? Thank you.

1
Did you try to set only 'Merge request events' in GitLab webhook configuration (as I see, you have both push and MR events).?biruk1230
Yes i tried this option too. and it doesn't work!Mostafa
What do you mean in phrase "doesn't work"? It's not triggered at all, or it's triggered by each push? If it's not triggered at all, maybe allowing any push event on Jenkins side can help.biruk1230
I tried all possible combinations: webhook(push & accept MR events) + jenkins(pushs + accepted MR), no builds has been trigrred if jenkins(pushs not checked)Mostafa
That's strange. I had the similar issue with GitHub webhooks for old Jenkins version, and the only solution I found is to recreate webhook each time after Jenkins job was changed. But seems to be that your issue is different. Anyway, I recommend you to update your Jenkins to the last LTS release (2.150.2) and GitLab plugin to 1.5.11 version.biruk1230

1 Answers

0
votes

you have to double check because i have same scenario and it's working fine

Gitlab_Integration_Setting