在构建步骤中访问Teamcity git变更日志

6
作为构建步骤的一部分,我想在发布构建时获取特定构建的更改日志。具体地说,是Git提交信息。
我不确定是否可以在构建步骤中通过Git实现此操作,或者将更改日志作为可访问的参数。非常感谢您的帮助。
1个回答

5

git log 很可能是你要找的答案:

anew@Wintermute$ git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short
* 8e11818 2013-02-05 | Add first rough prototype of json controller. Add naive first model as a placeholder. Add separate contexts
* 6570201 2013-01-30 | Remove DAO layer. Preparation for graph data layer. [4n3w]
* a079c87 2013-01-30 | Cleanup. Wish I had more time for this! [4n3w]

编辑:我找到了这个如何为TeamCity中未完成的更改组合git日志,可能是你正在尝试做的重复内容。


1
这正是我所需要的,我按照编辑中的链接进行了配置,正确地配置了TeamCity,获得了正确的项目ID,并在我们的CI上运行它。顺便说一句:如果您在TeamCity上启用了访客帐户,则可以使用-user guest:guest对其进行curl以获取访问权限。构建数据可通过guest获得。此外,如果由于任何原因无法使git工作,那么提交消息可在teamcity的xml API中获得,浏览一下,您就可以通过几个链接跟踪它。 - Ben Chester

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接