Personal experience of continuous integration tool CC

Source: Internet
Author: User
Tags echo message svn client xsl xsl file

Cruisecontrol (CC) is a well-established open-source continuous integration tool that supports many plug-ins and provides comprehensive documentation. General continuous integration applications can use CC to meet requirements, CC has not been updated for a long time.
When selecting the CI tool, the team can consider using the new Ci tool: Hudson

Common problems:

1. What languages can cruisecontrol use for CI?
CC is written in Java and supports Java. Of course, CC can be used as a CI tool in other languages, such as CPP and python, CC has been well integrated based on Ant. It does not provide many core functions, but is mostly implemented by plug-ins. If you want to finish

CC can also build an automatic server based on Ant, but there is no front-end UI.

2. Integration with the configuration library. Common configuration library software (VSS, CVS, SVN, and clearcase) supports plug-ins. SVN is currently the mainstream code configuration management system.
Integration of CC and SVN:
A. Install the svn client on the CI server and run the svn checkout code in the project.

B. Configure CC project code modification Detection
<Modificationset quietperiod = "30">
<SVN localworkingcopy = "projects/$ {project. name}/src"/>
</Modificationset>
If the code is not changed, CC will not execute the entire build process.

C. There are two ways to update code:
1) code update through exec SVN up
2) use svnant

3. Call distributed test server scripts
Cc's support for Distributed Systems is complex. We recommend that you use ant-contrib to call distributed servers directly.
Caller:
<Remoteant machine = "1.2.3.4" Port = "17000">
<Runtarget target = "auto_test">
</Runtarget>
</Remoteant>
Implementer:
<Antserver Port = "17000"/>
<Target name = "auto_test">
<Echo message = "auto_test running"/>
</Target>

4. Delete the default Demo project connectfour
* Delete connectfour. Ser
* Delete projects/connectfour
* Delete config. xml <project name = "connectfour"> nodes
* Delete logs/connectfour

5. Solve Chinese garbled emails
<Htmlemail charset = "gb2312"

6. Mail content Customization
<Htmlemail
CSS = "webapps/cruisecontrol/CSS/cruisecontrol.css"
Export dir = "webapps/cruisecontrol/XSL"
Logdir = "logs/$ {project. name }"
It mainly modifies the XSL file. The CC log is a standard XML file, which is converted to HTML through XSL.
Errors. XML is used to filter out unnecessary messages.

7. Unit Test
In fact, unit tests are integrated by Ant. JAVA supports the best and can be directly used by JUnit/junitreport.
Python can use pyunit
<Py-test>
<Fileset dir = "$ {python. SRC. dir}">
<Include name = "**/* _ test. py"/>
</Fileset>
</Py-test>

CPP can use cxxtest

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.