Reputation: 38
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
My webhook configuration on gitlab :
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.
Upvotes: 0
Views: 4056
Reputation: 377
I dont find any solution so far using the plugin alone, and as I read this plugin is not directly developed by gitlab, my combo solution so far is:
to have a freestyle job, with configured webhook, where I can choose the MR events I need (Opened/Accepted/Closed) and retrieve all gitlab variables like gitlabMergeRequestState
from this job call another job defined via a fully elaborated pipeline, passing that gitlab variables, where all needed details can be handled via gitlab API.
Upvotes: 0
Reputation: 914
you have to double check because i have same scenario and it's working fine
Upvotes: 0