为什么我的TeamCity构建停止工作? [英] Why did my TeamCity build stop working?

查看:326
本文介绍了为什么我的TeamCity构建停止工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个TeamCity构建配置,一直运行良好,直到最近。突然间,有一个构建卡住队列,表示它与任何代理不兼容。给出的理由是:

lockquote
隐式需求:在参数:BuildFormatSpecification中定义的teamcity.build.branch

blockquote>

我的BuildFormatSpecification参数是这样定义的:


%MajorVersion%。%MinorVersion%。 %PatchVersion% - %teamcity.build.branch%


这反过来用于Build Number Format字段以及一个构建计数器,如下所示:


%BuildFormatSpecification%。%sharedBuildNumber.id4%


这个想法是构建编号像1.0.0-develop.22一样出现,并包含正在构建的Git分支。这遵循语义版本控制的规则。这个方案在很多项目中都适用于我,但是突然间,这个构建被卡住了,我找不到原因。



有什么想法?

解决方案

teamcity.build.branch 是预定义的构建参数,但只有仅在分支规格。因此,要解决您的问题,请确保您的构建步骤配置了VCS根目录并添加了例如 +:refs / heads /(master)作为您的分支规范。 https://confluence.jetbrains.com/display/TCD8/Agent+Requirements\">代理要求和隐含要求:


对未知参数的任何引用(名称以%-signs命名)都被视为隐式需求。这意味着构建只能在提供参数的代理上运行。



否则,通过在构建中定义构建参数配置或项目级别。



I have a TeamCity build configuration that has been working fine until recently. Suddenly, there is a build stuck in the queue that says it is not compatible with any agents. The reason given is:

Implicit requirements: teamcity.build.branch defined in Parameter: BuildFormatSpecification

My BuildFormatSpecification parameter is defined thus:

%MajorVersion%.%MinorVersion%.%PatchVersion%-%teamcity.build.branch%

That in turn is used in the Build Number Format field along with a build counter, like this:

%BuildFormatSpecification%.%sharedBuildNumber.id4%

The idea is that the build number comes out like "1.0.0-develop.22" and includes the Git branch being built. This follows the rules for Semantic Versioning. This scheme has worked for me over a number of projects, but suddenly this one build is stuck and I can't figure out why.

Any ideas?

解决方案

teamcity.build.branch is a predefined build parameter but it is only defined when a branch specification is configured. Therefore, to fix your problem, make sure that your build step has a VCS root configured and add e.g. +:refs/heads/(master) as your branch specification.

From TeamCity's documentation on Agent Requirements and implicit requirements:

Any reference (name in %-signs) to an unknown parameter is considered an "implicit requirement". That means that the build will only run on the agent which provides the parameters named.

Otherwise, the parameter should be made available for the build configuration by defining it on the build configuration or project levels.

这篇关于为什么我的TeamCity构建停止工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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