JetBrains TeamCity CI - Merge Request triggers two build
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When JetBrains TeamCity CI integration is enabled, GitLab triggers two builds in TeamCity after a push to an existing merge request: one for the merge request and one for the changed branch.
Steps to reproduce
- Enable JetBrains TeamCity CI integration for your repository 1.1 Enable Trigger Push 1.2 Enable Trigger Merge Request
- Create a new branch and open a merge request
- Change something in your new branch and push it
- GitLab will trigger two builds on TC (1x branch and 1x merge request)
What is the current bug behavior?
GitLab triggers two builds. This leads to more load on the build server and therfore longer waiting times.
Disabling Trigger "Push" is no solution: GitLab will trigger builds for a merge request but after a merge no build will be triggered on master. Disabling Trigger "Merge Request" is no soultion: GitLab does not trigger any builds for merge requests.
We need merge requests to be build, because we only allow merges after a successful build. And we need builds on master because we only allow deploys from master.
What is the expected correct behavior?
GitLab should only trigger one build for an open merge request. After a merge/push to master GitLab should trigger a build on master.