如何从Git中获取完整的更改日志作为TeamCity中的工件

时间:2013-12-26 21:32:37

标签: teamcity changelog teamcity-8.0

我想知道,有没有办法让这个项目的完整更新日志作为TeamCity中的工件。

所以我希望它看起来像这样:

Build 1.0.0:
- Commit 1
- Commit 2
Built 1.0.1:
- Commit 3

有没有办法做到这一点?

1 个答案:

答案 0 :(得分:4)

作为一件神器,可能还不可能。

但你可以使用Teamcity的REST API来实现类似的目标:

  • 获取项目的所有/部分版本(使用 / httpAuth / app / rest / builds?locator = buildType:[buildtypeid] )。
  • 对于每个构建,更改日志的geta列表 log(使用 / httpAuth / app / rest / changes?build = id:[build id] )。
  • 对于每个更改日志,请获取更改日志详细信息(使用 / httpAuth / app / rest / changes / id:[change id] )。
  • 将上述数据格式化为您想要的格式。

您也可以随时查看构建结果中的“更改日志”选项卡,但它需要您解析html页面以获得所需的格式。

enter image description here

相关问题