Continuous integration tool CC Introduction

Source: Internet
Author: User
Cruisecontrol: CC for short, continuous integration tool, mainly provides version management tools (such as CVS) to perceive changes or continuous integration on a daily basis, continuous integration reports, emails, and jabber are provided to notify relevant owners. The requirement is that a daily-constructed project has prepared a fully automatic project compilation script (which can be based on maven or ant ).

Here, we will briefly talk about the use of CC in a project. Generally, there are two types of daily building requirements for projects:
1. Daily automatic integration.
2. detect changes in version management tools for automatic integration.

The project's daily build goals are generally:
1. detect changes in version management tools. If any changes are found, integrate them.
2. Call the project compilation script for Project integration.
3. Merge the unit test and function test logs generated by the project compilation script.
4. Publish the integrated report to the website.
5. Notify the corresponding owner of the integrated result by email or jabber.

Based on the above requirements, the project compilation script uses Maven, the version management tool uses CVs, and the continuous integration tool uses cc. Assuming that the maven-based project compilation script has been compiled, the cruisecontrol script is written as follows:
<? XML version = 1.0 encoding = UTF-8?>
<Cruisecontrol>
<Project name = demo buildafterfailed = true>
<! -- Run this command before checking whether there is any change. -->
<Bootstrappers>
<Currentbuildstatusbootstrapper file = logs/demo/buildstatus.txt/>
</Bootstrappers> <! -- Check whether there is any change. If there is any change, start Integration -->
<Modificationset quietperiod = 10>
<! -- CVS-based detection -->
<CVS localworkingcopy = demo/>
</Modificationset> <! -- Continuous integration -->
<Schedule interval = 18>
<! -- Project compilation script -->
<Maven mavenscript = D:/tools/Maven/bin/maven. bat
Projectfile = demo/Project. xml
Goal = Demo: build/>
</Schedule> <! -- Log records of the continuous integration process and logs to be merged -->
<Log dir = logs/demo>
<! -- Merge unit and function test logs generated in the project compilation script -->
<Merge dir = demo/target/test-Reports/>
</Log> <! -- Publish the results after continuous integration -->
<Publishers>
<Currentbuildstatuspublisher file = logs/demo/buildstatus.txt/>
<! -- Publish continuous integration results to the website. This method is not ideal. -->
<Execute Command = D:/tools/CC/reporting/JSP/build. Bat war/>
<! -- Notify the relevant owner by email -->
<Email mailhost = smtp.yourdomain.com
Returnaddress = buildmaster@yourdomain.com
Skipusers = true
Reportsuccess = fixes
Subjectprefix = [cruisecontrol]
Buildresultsurl = http: // buildserver: 8080/cruisecontrol/buildresults>
<Failure address = developers@yourdomain.com/>
<Success address = developers@yourdomain.com/>
</Email>
</Publishers>
</Project>
</Cruisecontrol>

For the XML specification in CC scripts and the installation and running of CC, refer to the official website of cruisecontrol:
Cruisecontrol.sourceforge.net

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.