在 TeamCity 中创建变更日志工件 [英] Create changelog artifact in TeamCity

查看:28
本文介绍了在 TeamCity 中创建变更日志工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以让 TeamCity 将文本或 html 更改日志作为其输出工件之一?

Is there a simple way to have TeamCity include a text or html change-log as one of its output artifacts?

也许我需要让 msbuild 或其他一些进程创建更改日志,但由于 TeamCity 为每个构建生成一个,我想知道是否已经有一种简单的方法可以将它作为工件访问并包含它在工件路径指令中,以便它可以成为发布包的一部分.

Perhaps I need to go down the route of having msbuild or some other process create the change log but as TeamCity generates one for every build, I'm wondering if there is already a simple way to access it as an artifact and include it in the artifact paths directives so that it can be part of a release package.

推荐答案

是的,更改日志可以作为文件访问,该文件的路径在 TeamCity 构建参数中:

Yes, the change-log is accessible as a file, path to this file is in the TeamCity build parameter:

%system.teamcity.build.changedFiles.file%

所以你可以这样做:

  • 向您的构建添加命令行构建步骤.
  • 使用类型自定义脚本.
  • 输入此脚本:
copy "%system.teamcity.build.changedFiles.file%" changelog.txt

  • 最后为您的构建编辑工件规则,将 changelog.txt 包含在您的工件中(常规设置 -> 工件路径 -> 添加changelog.txt").
  • 这篇关于在 TeamCity 中创建变更日志工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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