CruiseControl添加对Hyperic HQ的持续集成

  • 安装TortoiseSVN(小乌龟),SVN 客户端(可以使用SVN的命令,如checkou),Java并设置环境变量,Jboss并设置环境变量,PostgreSQL并新建hq数据库等设置
  • 在cruisecontrol的project文件夹中新建hq文件夹并使用小乌龟(TortoiseSVN)把HQ的源码检测到hq文件夹中
  • 在config.xml的配置文件中添加新的hq工程,具体代码如下

        <project name="hq">

            <listeners>
                <currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
            </listeners>

            <bootstrappers>
                <antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="clean" />
            </bootstrappers>

            <modificationset quietperiod="60">
                <!-- touch any file in hq project to trigger a build -->
                <filesystem folder="projects/${project.name}"/>
            </modificationset>

            <schedule interval="300">
                <ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="all,precompile-jsp,precompile-jsp,prepare-jboss,dbsetup,deploy" />
            </schedule>

            <log>
                <merge dir="projects/${project.name}/target/test-results"/>
            </log>

        </project>

  • 双击cruisecontrol.bat启动cruisecontrol
  • 打开浏览器输入http://IP:8080/dashboard/http://IP:8080/cruisecontrol/查看持续集成状态并手动编译测试