草色天涯
-
install and configure cc with standard configuration - [敏捷开发]
2009-04-18
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://dear.blogbus.com/logs/38070432.html
1. make sure that JDK installed and JAVA_HOME configured.
2. sudo vim cruisecontrol.sh, modify webport
3. replace config.xml
4. remove useless project under /logs and /projects
5. cd /projects, mkdir marsrover
6. cd /marsrover, run svn checkout http://marsrover.googlecode.com/svn/trunk/ . (don't miss .)
7. start cruise.
See the config.xml below:
<cruisecontrol>
<project name="marsrover"> <!-- should be the same as the project directory name-->
<!-- NOTE: if you want to force build even if no code modifications detected, you can add requiremodification="false" to the project attributes -->
<!--
there are some different scenerios -
http://confluence.public.thoughtworks.org/display/CC/CruiseControl+Scheduling+Scenarios
-->
<listeners>
<!-- listening for status change, such as waiting for build, queued, building, etc. Normally we won't change this configuration -->
<currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
</listeners>
<!-- NOTE: CC doesn't support check out the code on the first time, so you should check out code to the project directory first.-->
<!-- NOTE: if you're using https to update code, then the code should checked out firstly with command line, and accept certification permanently-->
<bootstrappers>
<!-- this element is used to checkout code, we use svn here, localWorkingCopy is used to check out code to local file system-->
<svnbootstrapper localWorkingCopy="projects/${project.name}"/>
</bootstrappers>
<modificationset quietperiod="30">
<!--if the code changed, and there are no checkins within quietperiod seconds, the cc will check out code from the repository-->
<svn localWorkingCopy="projects/${project.name}"/>
<!-- here we do a forced nightly build, it will create a faked modification on 11pm,
then it needn't <project requiremodification="false"> -->
<timebuild time="2300"/>
</modificationset>
<schedule interval="300">
<!-- do CI during the day, every 5 minutes-->
<!-- cc will launch a build every interval seconds, here we uses ant with the specified build file-->
<!-- NOTE: user can also specify time attribute to ant, such as <ant time="2300"> means build on 23:00-->
<ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
</schedule>
<log>
<!-- save log file, the file will be saved under logs/${project.name} by default-->
<merge dir="projects/${project.name}/target/junit-test-report"/> <!-- merge the build result -->
<!-- if we want to see the just test result in cc, the junit result should be located under the same directory as described above -->
<merge file="projects/${project.name}/target/checkstyle_report.xml"/>
<!-- to show the checkstyle result on the cc page, we should edit /webapps/cruisecontrol/main.jsp, and uncomment the lines below:
<cruisecontrol:tabrow/>
<cruisecontrol:tab name="checkstyle" label="CheckStyle">
<%@ include file="checkstyle.jsp" %>
</cruisecontrol:tab>
-->
</log>
<publishers>
<!-- publish the build result to the specified location, there are many plugins in cc to do all kinds of publishing, such as send out
email, call the specified page using http, play music, etc. -->
<onsuccess>
<!-- specify what will be published when build succeeded-->
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/${project.name}.jar"/>
<!-- in the element above, we must make sure that the built jar file should be exactly named as ${project.name}.jar-->
</onsuccess>
<!-- NOTE: if you want cruisecontrol to report a test failure as a build failure, you need to make Ant report the test failure as a failure. just like this:
<junit fork="true" haltonfailure="false" failureproperty="junit_test_failed" printsummary="on">
</junit>
<fail if="junit_test_failed" message="One or more JUnit tests failed"/>
see: http://confluence.public.thoughtworks.org/display/CC/FailOnTestFailure
-->
<htmlemail mailhost="smtp.gmail.com" mailport="465" usessl="true" username="xxx@gmail.com" password="xxx" reportsuccess="always" returnaddress="build@xxx.com" subjectprefix="xxx build logs">
<always address="xxx@gmail.com" />
</htmlemail>
</publishers>
</project>
</cruisecontrol>历史上的今天:
test cc & svn server integration 2009-04-18进InfoQ恰满一年 2008-04-18Scrum Adoption in China is published 2008-04-18随机文章:
敏捷与三项全能 2009-10-10整理一下rojam中的metaprogramming 2009-06-16《卓有成效的程序员》推荐序——做一个懒人 2009-02-19敏捷团队当如群鸟飞 2009-01-07《Manage It! 》中文版提供部分试译章节预览 2009-01-07
收藏到:Del.icio.us








