问题描述
当teamcity执行MSBuild步骤时,构建日志将具有可折叠/可扩展的层次结构。我有一个很大的构建步骤,该步骤运行一个powershell脚本,生成的构建日志很大,并且需要花费很多时间来加载。有没有一种方法可以使teamcity将一个构建步骤分成多个较小的步骤,而不仅仅是一个巨大的文本文件?
When teamcity executes an MSBuild step, the build log has a collapsible/expandable hierarchy. I have one big build step that runs a powershell script and the resulting build log is large and takes a lot of time to load. Is there a way to make teamcity split a single build step into it's many smaller steps instead of just one giant text file?
推荐答案
无法在日志中将构建步骤拆分为多个步骤,但是您可以创建嵌套的可折叠块,例如在中进行了介绍。在脚本中执行以下操作:
There is no way to split the build step into multiple steps in the log, but you can create nested collapsible blocks, as described in this answer. In your script do something like:
write-host "##teamcity[blockOpened name='<blockName>']"
#do work
write-host "##teamcity[blockClosed name='<blockName>']"
这篇关于TeamCity buildlog仅需一个构建步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!