`
julylin
  • 浏览: 47918 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

CruiseControl 实践(一)

阅读更多
config.xml文件:
<cruisecontrol>
    <project name="FWMS_CHRIST" buildafterfailed="false" requiremodification="false" forceonly="false">
    <!-- 创建前动作 -->
        <!-- 用于监听项目状态的变化 -->
        <listeners>
            <currentbuildstatuslistener file="${logs.dir}\${project.name}\status.txt" />
        </listeners>
        <!-- 用于监听在Repository是否变化  如果变化quietperiod秒后创建-->
        <modificationset quietperiod="5" >
			<starteam folder="code/webApp" starteamurl="192.168.20.53:49201/FWMS_CHRIST" username="zhangkunlin" password="hello" />
        </modificationset>
        <!-- 用于每隔interval秒,CruiseControl去检查并计划一次构建 (schedule驱动modificationset)-->
        <schedule interval="30">
            <ant anthome="${ant.home}" buildfile="projects/${project.name}/build.xml" uselogger="true" usequiet="true" />
        </schedule>
        <!-- 用于得到并保存log文件。默认情况下,将放在projects/${project.name}的目录下 -->
        <log>
            <merge dir="projects/${project.name}/test-results"/>
            <merge dir="projects/${project.name}/check-results"/>
            <merge dir="projects/${project.name}/findbugs-results" pattern="*-fb.xml"/>
            <merge dir="projects/${project.name}/pmd-results" pattern="*-pmd.xml"/>
        </log>
        <!-- 用于将构建的结果(如二进制文件)发布到指定的位置 -->
        <publishers>
            <htmlemail mailhost="smtp.163.com"
                returnaddress="xxxx@163.com"
                skipusers="false"
                subjectprefix="[CC构建日志]"
                css="webapps/cruisecontrol/css/cruisecontrol.css"
                xsldir="webapps/cruisecontrol/xsl"
                buildresultsurl="http://localhost:5555/cruisecontrol/buildresults/${project.name}"
                username="xxxx"
                password="xxxx"
                charset="UTF-8">
                <!-- 总是 -->
                <always address="yyyy@163.com" />
                <!-- 
	                     失败   <failure address="xxxx@163.com" />
    	                     成功<success address="yyyy@163.com" />
                 -->
            </htmlemail>
        </publishers>
        
        <plugin name="starteambootstrapper" classname="net.sourceforge.cruisecontrol.bootstrappers.StarTeamBootstrapper" />
        <plugin name="starteam" classname="net.sourceforge.cruisecontrol.sourcecontrols.StarTeam" />
        
        <property name="cc.home" value="D:\cruisecontrol-bin-2.8.4" />
        <property name="ant.home" value="${cc.home}\apache-ant-1.7.0" />
        <property name="logs.dir" value="${cc.home}\logs" />
        <property name="artifact.dir" value="${cc.home}\artifacts" />
  		<property name="checkout.dir" value="D:\CHRIST\code" />
  	</project>
</cruisecontrol>



CruiseControl的配置文件dashboard-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/********************************************************************************
 * CruiseControl, a Continuous Integration Toolkit
 * Copyright (c) 2007, ThoughtWorks, Inc.
 * 200 E. Randolph, 25th Floor
 * Chicago, IL 60601 USA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *     + Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *
 *     + Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *
 *     + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the
 *       names of its contributors may be used to endorse or promote
 *       products derived from this software without specific prior
 *       written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ********************************************************************************/
 -->
 <dashboard>
 	<buildloop
	    logsdir=""--这里指定logs目录,一定要与config.xml文件中一致,否则你会有麻烦。 如果为空串,则默认为工作目录下的logs目录。


      	    artifactsdir="" />--这里指定artifacts目录,一定要与config.xml文件中一致,如果为空串,则默认为工作目录下的artifacts目录。

	<features allowforcebuild=""/>--是否可以在Dashboard上强制构建(force build)

	<trackingtool projectname="" baseurl="" keywords=""/>--这是用于与Mingle的集成

 	<subtabs> --在这里,你可以自己扩展你自己的subtab页,不过要先实现一些接口。

	    <subtab class="net.sourceforge.cruisecontrol.dashboard.widgets.ErrorsAndWarningsMessagesWidget" />
	</subtabs>
</dashboard>


分享到:
评论

相关推荐

    持续集成及CruiseControl技术交流

    CruiseControl是一著名的CI服务器。本次交流会从零介绍它的使用,并附带大量的Demo演示。 注意,持续集成本身也是一持续改进的过程。如何逐渐提升可回归性、敏捷性,这是一个永恒的话题。 适合群体 具有一定的软件...

    持续集成实践之CruiseControl

    持续集成实践之CruiseControl

    CruiseControl持续集成

    CruiseControl是CI服务器的老者,诞生已是多年,在许多方面,CruiseControl服务器已经成为持续集成实践的同义词。而现在,CruiseControl已发展成为一个家族式系统,包括CruiseControl.java、CruiseControl.net、...

    OpenDoc-CruiseControl.rar_Windows编程_C#_

    本文将简单地介绍持续集成的一些基本概念,持 续集成到底是做什么的?持续集成的关键点在什么地方?怎么结合工具进行实践?最后一步步地演示怎么使用 CruiseControl 这个目前最热门的持续集成工具。

    Apache Maven 2 Effective Implementation

    - Continuum,一个持续集成的Server,另一个非常著名的开源server是CruiseControl - Archiva,搭建本地repository - EMMA,测试代码覆盖率统计工具,另一个非常注明的工具是Clover,不过是商业的软件 - 代码质量...

    Android手机客户端自动化测试实践

    Android手机客户端自动化测试实践,包含Monkey测试,MonkeyRunner测试,Robotium测试,Cruisecontrol持续集成测试

    自动进行团队构建和单元测试过程

    火龙果软件工程技术中心 本文内容包括:为什么要自动进行构建?配置构建服务器初始配置安装CruiseControl让...这篇文章介绍的是CruiseControl,这是一个开放源码软件,可以用它对有多个开发人员参与的软件项目自动

    Pro .NET Best Practices .net最佳实践 英文版

    10.2.1 CruiseControl.NET 10.2.2 Jenkins 10.2.3 TeamCity 10.2.4 Team Foundation Server 10.3 CI生命周期 10.3.1 重新生成 10.3.2 单元测试 10.3.3 分析 10.3.4 打包 10.3.5 部署 10.3.6 稳定性测试 10.3.7 生成...

    《.NET最佳实践》.((美)Stephen Ritchie)

    10.2.1 CruiseControl.NET 174 10.2.2 Jenkins 175 10.2.3 TeamCity 175 10.2.4 Team Foundation Server 176 10.3 CI生命周期 176 10.3.1 重新生成 177 10.3.2 单元测试 182 10.3.3 分析 184 10.3.4 打包 ...

    质量之匙:持续集成工具与实践

    编者按:CruiseControl:简称CC,持续集成工具,主要提供了基于版本管理工具(如CVS)感知变化或每天定时的持续集成,并提供持续集成报告、Email、Jabber等等方式通知相关负责人,其要求是  专访Thoughtworks公司...

    持续集成DailyBuild实践

    MicrosoftVisualStudio.NET20053.1CruiseControl.NETversion1.1;项目监控工具。3.2Nantversion0.85;基于.NET的自动化编译工具。3.3NantContrib;增强Nant的工具。3.4NUnitversion2.2.8for.NET2.0;单元测试的一个比较...

    实现持续集成

    它解释了如何用支持工具实现持续集成,这些工具包括IBMRationalClearCase,IBMRationalClearQuest和一个开放源码工具CruiseControl。持续集成在软件开发世界中是一个热门话题。尽管经常与敏捷过程连接在一起,例如...

Global site tag (gtag.js) - Google Analytics