I'm using GitLab 8.3.2 and TeamCity 9.1.6. I've set up the JetBrains TeamCity CI service and it is triggering builds in TeamCity when changes are pushed to GitLab.
I'd like it to also trigger a build when a merge request is created (my understanding is that this build could guarantee that hitting the merge button will not break things).
I've got the branch specification in TeamCity set to:
+:refs/heads/*
+:refs/(merge-requests/*)
I can see the merge requests in TeamCity, but they don't actually build.
The merge request in GitLab says 'CI build pending for xxxx'. The view details link does not contain a build number though. I suspect this is because it searches TeamCity to find a matching build and doesn't find it because it wasn't triggered in the 1st place.
I do not have any build triggers configured in TeamCity. (I did originally have a VCS trigger, but I turned it off once I realised that GitLab was triggering builds for me.)
How can I set things up so that a merge request triggers a build in TeamCity and have GitLab display the result of the build in the merge request.