如果有文件更改,有没有办法只在 Teamcity 中触发构建?
Is there a way to only trigger a build in Teamcity if there were file changes?
我们将 teamcity 与 github enterprise 一起使用。我们在合并请求和提交时将其设置为 运行。但是,git 不断为具有 0 个文件更改的合并发送 teamcity 提交消息,这会触发构建。
例如,这将触发构建:
I've found the documentation here for creating a trigger filter
但我没有找到创建更新文件数量过滤器的方法。
我认为这就是构建的原因
Triggering a Build on Branch Merge
The VCS trigger is fully aware of branches and will trigger a build once a check-in is detected in a branch.
When changes are merged / fast-forwarded from one branch to another, strictly speaking there are no actual changes in the code. By default, the VCS trigger behaves in the following way:
- When merging/fast forwarding of two non-default branches: the changes
in a build are calculated with regard to previous builds in the same
branch, so if there is a build on same commit in a different branch,
the trigger will start a build in another branch pointing to the same
commit.
- If the default branch is one of the branches in the
merging/fast-forwarding, the changes are always calculated against
the default branch, if there is a build on same revision in the
default branch, TeamCity will not run a new build on the same
revision.
值得注意的是,在尚未更新的分支上构建将由另一个分支中的合并触发。
您可能使用了结帐规则。否则,运行 在包含 0 个文件的合并提交上构建似乎是一个合适的操作:提交确实更改了结帐目录的内容并且应该触发构建。
如果您通过 TeamCity 检出规则限制检出内容,TeamCity 仅在实际更改检出目录的内容(通过合并目录中的文件)或提交图为TeamCity 不完全了解,它可能会影响结帐。
如果您不是 运行 最新的 TeamCity 版本(截至目前为 10.0.5),更新是有意义的。如果您仍然看到不影响检出文件的合并提交,并且不合并在 TeamCity 中配置 VCS 之前创建的提交,则将详细信息报告给 TeamCity support。
是有意义的
我们将 teamcity 与 github enterprise 一起使用。我们在合并请求和提交时将其设置为 运行。但是,git 不断为具有 0 个文件更改的合并发送 teamcity 提交消息,这会触发构建。
例如,这将触发构建:
I've found the documentation here for creating a trigger filter
但我没有找到创建更新文件数量过滤器的方法。
我认为这就是构建的原因
Triggering a Build on Branch Merge The VCS trigger is fully aware of branches and will trigger a build once a check-in is detected in a branch. When changes are merged / fast-forwarded from one branch to another, strictly speaking there are no actual changes in the code. By default, the VCS trigger behaves in the following way:
- When merging/fast forwarding of two non-default branches: the changes
in a build are calculated with regard to previous builds in the same
branch, so if there is a build on same commit in a different branch,
the trigger will start a build in another branch pointing to the same
commit.
- If the default branch is one of the branches in the
merging/fast-forwarding, the changes are always calculated against
the default branch, if there is a build on same revision in the
default branch, TeamCity will not run a new build on the same
revision.
值得注意的是,在尚未更新的分支上构建将由另一个分支中的合并触发。
您可能使用了结帐规则。否则,运行 在包含 0 个文件的合并提交上构建似乎是一个合适的操作:提交确实更改了结帐目录的内容并且应该触发构建。
如果您通过 TeamCity 检出规则限制检出内容,TeamCity 仅在实际更改检出目录的内容(通过合并目录中的文件)或提交图为TeamCity 不完全了解,它可能会影响结帐。
如果您不是 运行 最新的 TeamCity 版本(截至目前为 10.0.5),更新是有意义的。如果您仍然看到不影响检出文件的合并提交,并且不合并在 TeamCity 中配置 VCS 之前创建的提交,则将详细信息报告给 TeamCity support。
是有意义的