Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teamcity fails to merge automatically

Given there are master and dev git branches, a git repository is hosted on the Github and TeamCity 9.0.1 installed as a CI server.

The teamcity build project is configured to use github repository as a VCS root with refs/heads/master set as a default branch.

The desired behavior is to run auto-merge from master to dev when the build is successful.

So I add an Automatic merge build feature as specified here with the following settings:

  • Watch builds in branches => Branch filter: +:master
  • Merge into branch: dev
  • Merge commit message: TEAMCITY: Automatic merge branch master into dev
  • Perform merge if: build is successful
  • Merge policy: use fast-forward merge if possible

After pressing Run - the build is green, no errors are shown in the Build Log, but totally nothing was merged as desired!

What's wrong and where can I find the debug information about build features execution?

like image 813
Andrey Pesoshin Avatar asked May 09 '15 14:05

Andrey Pesoshin


People also ask

What is auto merge?

Auto Merge is a feature that appears in the form of a button right after a DC Job is done, in the job overview. The Auto Merge feature lets you automatically merge duplicate records from a DC Job with a threshold level of your choice.


1 Answers

The thing I really needed was to create a dedicated teamcity project (called Integration) which first handles commits in both master and dev branches. It was achieved by configuring a VCS Root for Integration project with refs/heads/dev specified as a default branch and +:refs/heads/master specified in a branches specification section.

The project has an automatic merge build feature configured with settings similar to specified in the question (branch filter: +:refs/heads/master, merge into branch <default>).

That is the way I solved it.

like image 198
Andrey Pesoshin Avatar answered Sep 19 '22 12:09

Andrey Pesoshin