如何让 Hudson 自上次部署以来创建变更日志

发布于 2024-09-19 03:11:03 字数 74 浏览 3 评论 0原文

我希望我们的 Hudson 部署作业能够输出自上次部署以来所有 Subversion 更改的更改日志。关于如何做到这一点有什么想法吗?

I would like our Hudson deploy job to output a changelog of all Subversion changes since last deploy. Any ideas to how that is done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狠疯拽 2024-09-26 03:11:03

事实证明,Hudson 自动生成自上次构建以来的更改列表。

由于我们在 Hudson 中设置了部署,因此每个部署都有一个提交列表及其更改。 Hudson email-ext 插件 使它们可以作为 $CHANGES,这样它就可以发送一封电子邮件正文中包含 $CHANGES 的电子邮件。

当然,这种方法有局限性:这里仅显示自上次部署以来的更改。因此,如果您手动停止部署,或者部署构建中断,则下一个更改日志仅包含此后的更改。自从上次成功部署以来就没有了。

另请参阅 Stackoverflow 问题中的相关讨论 通过 Hudson 发送 Subversion 更改日志信息

It turns out that Hudson automatically generates a list of changes since last build.

And since we set up deployment in Hudson, each deployment has a list of commits along with their changes. The Hudson email-ext plugin makes them available as $CHANGES, so that it for instance can send an email with $CHANGES in the email body.

Of course, there are limits to this approach: Only changes since last deploy are here. So if you manually stop deployment, or the deployment build breaks, then the next changelog only contains changes since that. And not since last successful deployment.

Also see a related discussion in the Stackoverflow question Sending Subversion Change Log Info Via Hudson

痴情换悲伤 2024-09-26 03:11:03

在运行 shell 脚本的 hudson 作业中添加构建步骤:

svn log -r HEAD:PREV > ./changelog

生成自上次提交以来的更改的更改列表。

您还可以按日期/日期范围执行 log -r。

您能否确定您的最后一次部署(我假设您可能不会在每个构建中都进行部署。)有关您的流程的更多信息将会有所帮助。

如果您使用标准化模式标记您的部署,那么创建一个允许您获得正确的 SVN 修订版的计数器将相当简单。

Add a build step in your hudson job that runs a shell script:

svn log -r HEAD:PREV > ./changelog

To generate a change list of the changes since the last commit.

You can also do a log -r by date/date-range.

Can you determine your last deploy (I assume you may not deploy with every build.) Some more information about your process will help.

If you tag your deployments with a normalised pattern it would be fairly simple to create a counter that would allow you to get the right SVN revision.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文