GitLab 10.7.3
Jenkins 2.107.3
CentOS 7.5 (1804)
I successfully configured the Jenkins and GitLab to integrate with each other through the GitLab Webhook API. The build jobs are triggered for the push events, no problems.
But what I really want, is to have the build jobs triggered only when a merge request is “completed”.
Right now, the build jobs are being triggering when the merge request is submitted.
Settings:
For the GitLab webhook, I selected check boxes:
“Issues events”
“Merge request events”
For the Jenkins job, I selected:
“Build when a change is pushed o GitLab”
- Push events
- Accepted merge request events
- Comments
Result: I get the merge in GitLab but not the build in Jenkins
When I add:
“Build when a change is pushed o GitLab”
- Opened merged request events
The Jenkins build job is started.
I did read how GitLab defines the merge request event trigger:
“Triggered when a new merge request is created, an existing merge request was
updated/merged/closed or a commit is added in the source branch”
Is there some method to trick the trigger to only work when the merge request is accepted and not opened?
thx