论坛首页 综合技术论坛

cruisecontrol 持续集成工具配置

浏览 2377 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-09-26  
cruisecontrol 持续集成工具配置
重要网址:
下载地址:http://cruisecontrol.sourceforge.net/download.html
配置参考:http://cruisecontrol.sourceforge.net/main/configxml.html#svn
通过svn获得需要编译的代码
建立用户control 专门用于构建
解压cruisecontrol-bin-2.8.2.zip
控制台中在projects文件下执行
svn http://svn.rdev.kingsoft.net/wpsng/tracker/operation/coding --username liqiangqiang --password kingsoft
这样就将coding目录checkout到192服务器上了,也就是在svn的控制中。
配置:
版本:CC 2.82
系统:CentOS (10.20.134.192)
Config.xml
<cruisecontrol>
    <project name="wpsopdev">

<schedule>
    <exec command="svn"
               workingdir="projects/coding/"
                    args="update"
              errorstr="update failed"/>
</schedule>

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

        <bootstrappers>
            <antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/coding/build.xml" target="clean" />
        </bootstrappers>

        <modificationset quietperiod="30">
            <!-- touch any file in connectfour project to trigger a build -->
            <!--filesystem folder="projects/coding/"/-->
     <svn localWorkingCopy="projects/coding/" username="liqiangqiang" password="kingsoft"/>

        </modificationset>

        <schedule interval="300">
            <ant anthome="apache-ant-1.7.0" buildfile="projects/coding/build.xml"/>
        </schedule>

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

        <publishers>
            <onsuccess>
                <artifactspublisher dest="artifacts/${project.name}" file="projects/coding/${project.name}/target/${project.name}.jar"/>
            </onsuccess>
        </publishers>
    </project>
</cruisecontrol>
更改端口:(默认端口为8080,常被占用~~~)
Cruisecontrol.sh文件最后几行
EXEC="$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder -Dcc.library.dir=$LIBDIR -Djetty.logs=$JETTY_LOGS -jar $LAUNCHER $@ -jmxport 8100 -webport 8585 -rmiport 1199"
echo $EXEC
$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder "-Dcc.library.dir=$LIBDIR" "-Djetty.logs=$JETTY_LOGS" -jar "$LAUNCHER" $@ -jmxport 8100 -webport 8585 -rmiport 1199 &
echo $! > cc.pid

Dashboard
http://10.20.134.192:8585/dashboard/tab/dashboard
通过这个链接可以查看状态,日志 等。
build.xml
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics