0
votes

We are trying to have a build triggered on a merge request, but it's not happening, we followed http://www.nguyenquyhy.com/2017/10/how-to-integrate-teamcity-and-gitlab-ci/, with no luck.

Is it feasible to trigger the build when a merge request is created ?

We are using: “TeamCity 2017.2.3 (build 51047), effective release date 2017-11-27, currently running in the professional mode. Maximum number of authorized agents: 3 agents provided by professional edition license Maximum number of build configurations: 100 build configurations provided by professional edition license ” And gitLab as a hosted service.

1
I think that is possible by adding a trigger in GitLab. You can either use curl or API for doing this. You may consider referring this: docs.gitlab.com/ee/ci/triggersArihant Godha

1 Answers

2
votes

Thanks on the comment. As specified in the mentioned article, we needed to add this into the VCS root:

"+:refs/heads/(*) and +:/refs/(merge-requests/*)/head"

This actually gets the merge requests available as branches to be built from.

Well we sorted out by creating a trigger with a slightly different format: "+:merge-requests/*"

This triggers the build when a merge request.