17

我试图找出是谁触发了失败的 Hudson 构建。但我发现Started by an SCM change而不是Started by 'UserId'. 这是什么意思?

4

4 回答 4

17

It means that someone checked in code changes to your version control system / software configuration management (CVS, SVN, Git, etc), and Hudson started a built based on that change.

You should be able to see who it was by clicking the "Changes" link on the left menu.

于 2010-11-12T13:55:41.853 回答
6

“SCM”是“软件配置管理”,即你的版本控制系统。Hudson 可以配置为轮询 CVS、SVN 等以了解对源代码的更改,并根据该更改触发构建。

于 2010-11-12T11:28:16.070 回答
2

我正在编写一个脚本来向开始构建的开发人员发送一封包含变更集列表的电子邮件。在网上花了几个小时试图搜索解决方案后,我找到了一种解决方法,可以挖掘 hudson 日志文件。可能不是最干净的方法,但它确实有效。每次当 hudson 启动构建时,它都会将构建状态记录到日志文件中。日志看起来像这样..

Started by user <****>
Building remotely on Slave1
$ hg clone -r test_clone https://mercuial.com/build /some/workspace/test_clone
adding changesets
adding manifests
adding file changes
added 355 changesets with 298 changes to 43 files
updating to branch default
41 files updated, 0 files merged, 0 files removed, 0 files unresolved
...
...

日志文件位于~workspace/jobs/${RELEASE}/builds/${BUILD_NUMBER}/log. 然后,您可以解析 UserId 的日志文件。像这样的东西应该工作。

用户 ID=head -1 ~workspace/jobs/${RELEASE}/builds/${BUILD_NUMBER}/log|cut -d" " -f4

于 2011-11-30T02:37:12.647 回答
0

当结帐分支名称和指定的分支名称相同时,jenkins 中出现了同样的问题。任何更改都会触发 hudson 自动创建一个构建以迎头赶上。

解决方法:将本地分支名称更改为其他名称(或者不要使用它,也许)

于 2017-03-28T11:23:20.953 回答