如何在 Cruisecontrol 的发布者中使用构建标签?
我的 CruiseControl config.xml
文件中有此部分:
<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/fred"/>
<execute command="hg -R hg-succeeded/${project.name} pull"/>
<execute command="hg -R hg-succeeded/${project.name} tag -l build-${label} -r tip"/>
</onsuccess>
</publishers>
我得到的标签看起来像 build-${label}
。 ${label}
部分没有像我期望的那样被构建标签替换。我期待类似 build.1
的内容出现在 ${label}
的位置。我怎样才能做到这一点?
我的项目中确实使用
标记配置了默认的 labelincrementer。
另外,CruiseControl 文档绝对是糟糕的。有没有更好的文档?
I have this section in my CruiseControl config.xml
file:
<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/fred"/>
<execute command="hg -R hg-succeeded/${project.name} pull"/>
<execute command="hg -R hg-succeeded/${project.name} tag -l build-${label} -r tip"/>
</onsuccess>
</publishers>
I'm getting tags that look like build-${label}
. The ${label}
part isn't being replaced by the build label like I expect. I'm expecting something like build.1
to show up in place of ${label}
. How do I make this happen?
I do have the default labelincrementer configured with a <labelincrementer />
tag in my project.
Also, the CruiseControl documentation is absolutely awful. Is there better documentation anywhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想将
${label}
替换为 SVN 修订号之类的内容,您可以构建一个标签增量器插件 - 请参阅 http://www.java2s.com/Open-Source/Java-Document/Build/例如 Cruisecontrol/net/sourceforge/cruisecontrol/labelincrementers/SVNLabelIncrementer.java.htm。它被内置到一个 jar 中,并放置在 CruiseControl\lib 目录中。
在您的 CC 配置中,您可以通过声明来定义此插件:
您可以在
标记内添加您喜欢的任何属性;它们将通过setXXX
方法注入到您的LabelIncrementer
子类的实例中。If you want to replace
${label}
with something like a SVN revision number, you can build a label incrementer plugin - see http://www.java2s.com/Open-Source/Java-Document/Build/cruisecontrol/net/sourceforge/cruisecontrol/labelincrementers/SVNLabelIncrementer.java.htm for an example.This is built into a jar, and placed in the CruiseControl\lib directory.
In your CC config, you'd define this plugin by declaring:
You can add any attributes you like inside your
<labelincrementer ... />
tag; they'll be injected into an instance of yourLabelIncrementer
subclass bysetXXX
methods.好吧,没有人回答这个问题,所以我会把这个答案放在这里,这样我就可以在明天的某个时候选择它并失去赏金。 叹气
我的答案是使用Hudson,因为看起来CruiseControl真的已经失效了做任何有用的开发,并已转向主要从事我不感兴趣的 .NET 版本。尽管如果有人知道如何在 CruiseControl 中做到这一点,我仍然洗耳恭听。
Well, nobody has answered this, so I will put this answer here so I can select it sometime tomorrow and lose the bounty. sigh
My answer is to use Hudson, since it looks like CruiseControl has really fallen off doing any useful development and has switched to largely working on the .NET version which I have no interest in. Though if anyone knows how to do it in CruiseControl I'm still all ears.