Using Jenkins with the GitLab plugin. I just want to make sure I am using this correctly.
I would like a Jenkins job to be completed when a commit on any branch is pushed. For this I can use a push event webhook.
Then a merge request is created and approved and (hopefully) merged.
Merging may create new code which needs to be built and tested.
Is my best approach to create a Jenkins job or pipeline that is watching the integration branch with a push event?
Or to use a merge request webhook which will run on creation. And the actual merge. Is there a way to run the build on the merged code before the merge request is approved and actioned?