如何在 teamcity 中分离构建步骤的输出日志

How to seperate output log of a build step in teamcity

我有一个 python 脚本,可以同时构建 100 个库和应用程序,这看起来像是 teamcity 中的一大构建步骤。但我想让每个构建看起来像 teamcity 中的一个单独的构建步骤,或者至少能够标记其中一个构建失败的时间。

有没有办法以编程方式设置 teamcity 以调用这些构建或格式化 python 受控构建的输出,使其在查看 teamcity 作业状态日志时看起来像单独的步骤?

您可以在构建脚本中使用一些特殊消息来报告消息。

像这样:

##teamcity[message text='<message text>' errorDetails='<error details>' status='<status value>']

或opening/closing块

区块开启:

##teamcity[blockOpened name='<blockName>' description='<this is the description of blockName>']

区块关闭:

##teamcity[blockClosed name='<blockName>']

将其作为脚本的标准输出发送就足够了。

可能消息的完整列表here