cruiseControl learning
最近看了些关于持续构建的内容,才知道差了好多,下面是自己的一些记录,可能比较乱,而且也不全是关于cruiseControl的, 希望对大家有用
...........................
一个 continuous integration 工具,能团队进行敏捷开发,每过一段时间来进行集成,以便随时能发现引入的错误。当build失败后,将会通知提交者,使其能够更改代码。
cruiseControl(CC)的配置是围绕六个插件来展开的。
在提交之后,build失败了,如果不希望在再次提交代码之前重复的构建,可以有如下设置 <project name="integration" buildafterfailed="false">
----
1. Bootstrapper: cc创建之前运行,是创建前的准备工作 ....Bootstrappers are run before a build takes place
<bootstrappers>
<currentbuildstatusbootstrapper> 指定了状态文件的位置,主要是用来访问项目当前创建的状态
<cvsbootstrappers> 可以是其他的源码控制系统,.....就是为从源码控制系统更新ant 的 buildfile 文件而设计的.....
因为我们每次项目的创建都应该基于最新的代码,因此在创建之前就要获得最新的项目文件, 如果你使用的是ant, 这个工作是由ant 的buildfile来完成的。
2. SourceControl:访问源码控制系统,查看源码自上次build之后是否被修改。并据此决定是否需要进行下一次Build
<modificationset> ,用于检查各个源码控制系统中是否发生变化,<schedule>会用到这里面的配置信息,如果检测到变化,会触发创建过程。
3. Builder:对项目进行创建,(包括对项目源码的的编译,测试,打包)
<schedule> 定时驱动<modificationset>,如果检测到变化,就执行所指定的builder 的任务。
当<modificationset>检测到修改时,如果没有调用build,下次也不会调用build,因为下次没有检测到失败。
但是build失败时,会一直要重新构建,直到构建成功。................??????????
因此build失败后,再此成功时,至少有两次被修改了,即modifications 为2
----------------------------------------------------------------
<schedule interval="60">
<ant anthome="apache-ant-1.7.0" buildfile="cc-build.xml" saveLogDir="projects/${project.name}" antworkingdir="projects/${project.name}"
target="build" />
</schedule>
当ant节点的antworkingdir属性设定之后,buildfile的起始位置将是 antworkingdir的位置,切记。(ant应用中)ant调用其他文件时,好像也是样的吧,需要查查
-------------------------------------------------------------
4. LabelIncrementer:对源码打标签,自动增加标签的编号
5. Publisher:发布创建的结果,可以通过email的方式通知开发人员()。。。。
IRCPublisher 将结果发入一irc服务器,需要一个 ircPublicsher插件, http://confluence.public.thoughtworks.org/display/CC/IRCPublisher
--------------------------------
当提交的人提交的内容导致了错误,将发送错误消息给他,配置如下:需要注意的一点是,如果cvs用户名是"Paul wei"形式,用户名之间有空格的,CC只提取前面一部分,作为用户名,所以需要加个<map alias="Paul" address="**@**"
/>
<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.jar" />
</onsuccess>
<currentbuildstatuspublisher file="logs/${project.name}/status.txt" />
<email mailhost="smtp.host"
returnaddress="admin@smtp.host"
skipusers="false"
reportsuccess="fixes"
subjectprefix="[CruiseControl]"
buildresultsurl="http://192.168.0.15:8080/buildresults/integration"
>
<map alias="Paul" address="paul@smtp.host" />
</email>
</publishers>
------------------------------------
6. Listener:用于处理一些项目有关的事件 ???
============================
其他的一些问题,
1.当报下面的错误时: 即ant logfile找不到,
- exception attempting build in project integration
net.sourceforge.cruisecontrol.CruiseControlException: ant logfile **\log.xml is empty. Your build probably failed. Check your CruiseControl logs.
请往这句话的上面查看,很可能是其他地方出错了,比如构建文件找不到。下面是我曾遇到过的一种情况
2008-04-11 10:21:22,091 [Thread-8 ] INFO Project - Project integration: now building
2008-04-11 10:21:22,091 [Thread-8 ] INFO ProjectController - integration Controller: build progress event: now building
2008-04-11 10:21:22,857 [Thread-16] INFO ScriptRunner - Buildfile: projects\integration\cc-build.xml does not exist!
2008-04-11 10:21:22,889 [Thread-15] WARN ScriptRunner - Build failed
下面这个blog是另一种情况,内存不够
http://www.bxm.at/blogs/java/2007/08/19/cruisecontrolexception_ant_logfile_does_
........
2. ant 的cvs如果要执行 add 或者 update等命令时,需要相对路径,绝对路径时会出错。
<cvs cvsroot="${cvsroot}" command="update ../ab/ch.txt" />
......
----------------------------------------
从java development with ant中一些关于cruisecontrol的tips
? CruiseControl recommends that you use Jikes instead of javac because it is
faster and leaks less memory.
? Likewise, if you do use the javac compiler or another big Java program, set
fork="true".
? Get a mobile phone with SMS messaging and set up an email alias, and then
you can get paged when things go wrong—and when they start working again.
分享到:
相关推荐
CruiseControl笔记,详细介绍了CruiseControl。net的配置,希望对大家有所帮助
主题:持续集成及CruiseControl技术交流 在提升软件质量、降低研发风险、拒绝浪费方面,处于敏捷实践领域的持续集成(Continuous Integration,CI)起到重要作用。持续集成能够解决研发工作中的80%任务(日常),...
cruisecontrol配置定时运行
CruiseControl简介及使用举例
CruiseControl.NET 是 .NET 平台下的持续集成工具,CruiseControl (Java) 的 .NET 移植版本。CruiseControl是一个针对持续构建程序(项目持续集成)的框架,它包括一个email通知的插件,Ant和各种各样的CVS工具。Cruise...
cruisecontrol配置文件,很实用
CruiseControl-2.8.4.exe
cruisecontrol简介
cruisecontrol、ant、svn持续集成 己两个多星期以来对持续集成的概念和应用有了一些了解。下面主要对自己配置持续集成的环境进行总结。(看上去简单,但是对我开始对持续集成都没什么了解的人来说确实费了不少周折)
cruisecontrol+maven2配置做持续集成
[CruiseControl]binary安装和启动
CruiseControl.NET-CCTray-1.8.4.0-Setup.exe
CruiseControl.NET-1.4.4-Setup.exe
With the emergence of vehicle-to-vehicle communi-cation technology, cooperative adaptive cruise control (CACC) cars can be expected in the near future. In this paper, novel criteria for string ...
CruiseControl.NET-CCTray-1.5.6804.1-Setup
而现在,CruiseControl已发展成为一个家族式系统,包括CruiseControl.java、CruiseControl.net、CruiseControl.ruby等适应不同语言环境的实现,其强大的插件和扩展能力也是诸多同类系统无法比你的。而在这里,我只...
1.认识CruiseControl 2.CruiseControl的安装 3. CruiseControl的配置 4.总结
CruiseControl.NET-1.8.2.0-Setup.exe ccnet 服务端
剖析CruiseControl:在没有应用持续集成之前,传统的开发模式是项目一开始就划分模块,然后等所有的代码都开发完成之后再集成到一起进行测试,软件规模也在扩大,软件需求越来越复杂,软件已经不能简单地通过划分...
Curisecontrol持续集成的客户端版,CruiseControl.NET-CCTray-1.4.1-Setup.exe