【发布时间】:2011-01-10 01:37:08
【问题描述】:
所以,我的 CruiseControl.net 项目遇到了这个奇怪的问题。我有一个 ccnet.config 文件,它从我的 bitbucket 存储库中提取,运行基本构建,然后运行一些单元测试,最后将测试文件复制到 webroot。看起来很基础,即使是我第一次使用 CC.Net。
当然,我希望在我提交时运行它。由于无法编写 bitbucket 可以通过其服务框架调用的某种网页,我决定让 CC 运行计划构建,并且仅在源代码控制发生更改时才运行完整构建。
经过一番谷歌搜索,我发现在 1.6 中,它有一个 cronTrigger。正是我需要的。因此,我将以下块添加到我的配置中:
<cronTrigger>
<cronExpression>*/5 * * * *</cronExpression>
</cronTrigger>
然后它触发正常,但随后我在控制台中得到一个循环:
[HMS:INFO] Calling hg log -r tip --template {rev} --noninteractive
[HMS:DEBUG] Starting process [C:\Program Files (x86)\TortoiseHg\hg.exe] in working directory [C:\build\hms\src] with arguments [log -r tip --template {rev} --noninteractive]
[HMS:DEBUG] Not setting PriorityClass on [C:\Program Files (x86)\TortoiseHg\hg.exe] to default Normal
[8:DEBUG] [HMS C:\Program Files (x86)\TortoiseHg\hg.exe] standard-error stream closed -- null received in event
[7:DEBUG] [HMS C:\Program Files (x86)\TortoiseHg\hg.exe] 60
[7:DEBUG] [HMS C:\Program Files (x86)\TortoiseHg\hg.exe] standard-output streamclosed -- null received in event
[3:DEBUG] [HMS C:\Program Files (x86)\TortoiseHg\hg.exe] process exited event received
[HMS:INFO] No modifications detected.
这个循环一直持续到我进入并删除 cronTrigger 块。我真的不希望这个东西忙于在我的服务器上等待更改,而且我确信 BitBucket 不会对每秒多个请求而微笑。
那么,简而言之,我该如何阻止这个东西骚扰 bitbucket?停止使用 CC.Net?让我自己点击“构建”按钮?
另外:我的 ccnet.config 文件供参考:http://pastebin.com/6jSPxVTk
【问题讨论】: