Add a new project to CruiseControl-CruiseControl step by Step (3)

Source: Internet
Author: User
Tags svn svn update

OK, now we have built a continuous integration server on our own machine and have a preliminary understanding of its configuration file. In this article, we are going to add our own projects to them. As an introductory example, let's start by stating the assumptions so that we can quickly advance our deployment process.

first, prepare for work (please confirm)

1, your project code on Google code above (Google Code is SVN), your project name is Yourprojectname, the project's source files are placed in the trunk directory. So, its SVN update link is as follows:http://yourprojectname.googlecode.com/svn/trunk/. CruiseControl only updates the file, does not modify the source code, so anonymous checkout is possible.

2, your project is a Java project, build with ant, build file named Build.xml, put on the project root directory, the default ant task name is all. Make sure that all of the paths in the file are relative to the project root, copy them to any directory, and the ant all works correctly. (Our primary goal is to build the environment so that it can play a role in future development work, rather than discovering the errors in our build scripts.) )

3, your CruiseControl working directory is C:/cruisecontrol, for convenience, we will use the following ${cc_home} instead.

4, your logs directory is ${cc_home}/logs. If you do not change the configuration on your own, its location is as described earlier.

5, your projects directory is ${cc_home}/projects. If you do not change the configuration on your own, its location is as described earlier.

6, your artifacts directory is ${cc_home}/artifacts. If you do not change the configuration on your own, its location is as described earlier.


Ii. joining the project

1, manually check out the file:

Make sure that your project code is checked out to the ${cc_home}/projects/yourprojectname directory, where the directory is the root of your project and you can find the file named Build.xml.

2. Modify the configuration file (add your project)

Add the following snippet to the CONFIG. file, located under the <CruiseControl> node.


< project name = "Yourprojectname" >--this must be the same as the project name in your projects directory

< listeners >
< Currentbuildstatuslistener file = "Logs/${project.name}/status.txt"/>
</Listeners >

< Bootstrappers >
< Svnbootstrapper localworkingcopy = "Projects/${project.name}"/>
</bootstrappers >

< Modificationset Quietperiod = "a" >
< svn localworkingcopy = "Projects/${project.name}"/>
</Modificationset >

< Schedule interval = "+" > < ant anthome = "apache-ant-1.7.0" buildfile = "Projects/${project.nam E}/build.xml "/>
</Schedule >

< log >
< merge dir = "Projects/${project.name}/target/test-results"/>
<!--in the above sentence, be sure to find this dir after the build fails, if not, remove this element well--
</Log >

< publishers >
< onsuccess >
< Artifactspublisher dest = "Artifacts/${project.name}" file = "Projects/${project.name}/target/${project.name}". Jar "/>
<!--in the previous sentence, make sure that the file name you've packaged is Yourprojectname.jar--
</onsuccess >
</Publishers >

</Project >

The final file is as follows:

< CruiseControl >
< project name = "Connectfour" >

< listeners >
< Currentbuildstatuslistener file = "Logs/${project.name}/status.txt"/>
</Listeners >

< Bootstrappers >
< Svnbootstrapper localworkingcopy = "Projects/${project.name}"/>
</bootstrappers >

< Modificationset Quietperiod = "a" >
< svn localworkingcopy = "Projects/${project.name}"/>
</Modificationset >

< Schedule interval = "+" >
< 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 >
         </

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.