Teamcity无法自动合并 [英] Teamcity fails to merge automatically

查看:115
本文介绍了Teamcity无法自动合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到 master dev git分支,git仓库作为CI服务器安装在Github和TeamCity 9.0.1上。



teamcity构建项目配置为使用github存储库作为VCS根目录, refs / heads / master 设置为默认分支。



期望的行为是在构建成功时从 master 运行到 dev 的自动合并。



因此,我添加了一个自动合并构建功能



在按下Run之后 - 构建为绿色,Build Log中没有显示错误,但完全没有按照需要合并!



有什么不对?我可以找到有关构建特性执行的调试信息吗?

解决方案

我真正需要的是创建一个专用的teamcity项目首先处理 dev 分支中的提交(集成)。这是通过为指定为默认分支的 refs / heads / dev 配置一个用于集成项目的VCS根,并且 + :在分支规范中指定的refs / heads / master 部分。 (分支过滤器: +:refs / heads / master ,并入分支< default> )。



这就是我解决问题的方法。


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?

解决方案

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.

这篇关于Teamcity无法自动合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆