[CI]Starting CruiseControl

本文详细介绍了如何配置和使用CruiseControl进行持续集成,包括项目设置、日志管理、构建触发、发布流程和邮件通知等关键步骤,旨在帮助开发者高效地管理和部署软件项目。
这几天在学习cruisecontrol,也看了不少人的博客,把自己在入门阶段学的看的东西写在这里吧.CruiseControl(以下简称CC)自带ant,logs 下面包括日志信息,可以通过在config.xml 中指定日志路径和名称;projects 下面放的是需要进行持续集成的项目,lib 目录中放有cruisecontrol.jar 和其他运行需要的jar,webapps下是cruisecontrol build 结果的网站,可以通过访问 http://127.0.0.1:8080/cruisecontrol 来查看build 的结果,个人更加喜欢先访问 http://127.0.0.1:8080/,然后选择cruisecontrol或者dashboard,在build 后会产生artifacts 目录,这个目录用来存放发布的工件。
第一次启动CC之后会发现有一个默认的工程已经在projects 下了,根据这个工程的配置我们可以学到很多东西,为你自己的工程配置提供很多帮助。很多工程的配置都是类似的,举一反三就ok了,在CC根目录下的config文件是cc的配置文件,调用工程的build文件。下面是我的config文件

<!-- cruisecontrol's config.xml deploy documents in http://cruisecontrol.sourceforge.net/main/configxml.html -->
<cruisecontrol>

 <!-- we can define some parameters here -->
 <property name="artifacts" value="./artifacts" />
 
 <!--
 project name should be same as name of the folder which path is cruisecontrol/projects, buildafterfailed="false" means cc will not build if you do not update code, if buildafterfailed="true"  or you just do not define it, cc will build all along until it is correct, you will receive hundreds of e_mail one day
 -->
    <project name="CeoPhase1" buildafterfailed="false">
      <!-- monitor the change of project -->
            <listeners>
              <!-- project.name is what you define on top. In this projext, project.name = CeoPhase1 -->
                    <currentbuildstatuslistener file="logs/${project.name}/status.txt" />
            </listeners>
           
   <!-- CruiseControl update code from svn -->
            <bootstrappers>
                    <svnbootstrapper localWorkingCopy="projects/${project.name}" />
            </bootstrappers>
           
   <!-- monitor the project, if there is change, run buildfile to deploy again,
   if there is no change, do not run buildfile. There is 60 seconds, and we can not run in this 60 seconds,
   to protect svn update completely -->
            <modificationset quietperiod="60">
                    <svn localWorkingCopy="projects/${project.name}" />
            </modificationset>

   <!-- specify rebuild every 600 seconds when there is change in project-->
            <schedule interval="600">
              <!-- specify the buildfile which runs in ant -->
                    <ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" >
                            <!-- set jvm argument make sure it have enough memory -->
                            <jvmarg arg="-Xms64m -Xmx512m" />
                    </ant>

            </schedule>

   <!-- specify where the logs are -->
            <log>
                    <merge dir="projects/${project.name}/report" />
            </log>
           
   <!-- publish result  -->
            <publishers>
              <!-- put war package to artifats direction when build success -->
                    <onsuccess>
                            <artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/dist/${project.name}.war" />
                    </onsuccess>
                    <!-- sent e-mail to someone, give him(her) a link of web address -->
                    <email mailhost="mail.hengtiansoft.com" returnaddress="CruiseControl@hengtiansoft.com"
                            buildresultsurl="http://172.16.4.41:9000/cruisecontrol/buildresults/${project.name}">
                            <!-- specify send e-mail to whom when build fail -->
                            <failure address="cisco_ceocio_dev@hengtiansoft.com" />
                            <!-- specify send e-mail to whom when build success -->
                            <success address="cisco_ceocio_dev@hengtiansoft.com" />
                    </email>
            </publishers>
    </project>
   
 <project name="connectfour">

         <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="30">
                 <filesystem folder="projects/${project.name}"/>
         </modificationset>

         <schedule interval="3600">
              <ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
         </schedule>

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

         <publishers>
              <onsuccess>
                  <artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.jar"/>
              </onsuccess>
   <htmlemail mailhost="mail.hengtiansoft.com" returnaddress="keyongshi@hengtiansoft.com"
    buildresultsurl="http://172.16.4.41:9000/cruisecontrol/buildresults/${project.name}">
    <failure address="keyongshi@hengtiansoft.com" />
    <success address="keyongshi@hengtiansoft.com" />
   </htmlemail>

  </publishers>

 </project>

</cruisecontrol>




基于NSGA-III算法求解微电网多目标优化调度研究(Matlab代码实现)内容概要:本文围绕基于NSGA-III算法的微电网多目标优化调度展开研究,重点介绍了如何利用该先进多目标进化算法解决微电网系统中多个相互冲突的目标(如运行成本最小化、碳排放最低、供电可靠性最高等)的协同优化问题。文中结合Matlab代码实现,详细阐述了NSGA-III算法的基本原理、在微电网调度模型中的建模过程、约束条件处理、目标函数设计以及仿真结果分析,展示了其相较于传统优化方法在求解高维、非线性、多目标问题上的优越性。同时,文档还提供了丰富的相关研究案例和技术支持背景,涵盖电力系统优化、智能算法应用及Matlab仿真等多个方面。; 适合人群:具备一定电力系统基础知识和Matlab编程能力的研究生、科研人员及从事能源优化领域的工程技术人员;尤其适合正在进行微电网调度、多目标优化算法研究或撰写相关论文的研究者。; 使用场景及目标:①掌握NSGA-III算法的核心思想及其在复杂能源系统优化中的应用方式;②学习如何构建微电网多目标调度模型并利用Matlab进行仿真求解;③为科研项目、毕业论文或实际工程提供算法实现参考和技术支撑。; 阅读建议:建议读者结合文中提供的Matlab代码实例,逐步调试运行并深入理解算法流程与模型构建细节,同时可参考文档中列出的其他优化案例进行横向对比学习,以提升综合应用能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值