Cruisecontrol is an old CI server and has been born for many years. In many aspects, the cruisecontrol server has become a synonym for continuous integration practices. Now, cruisecontrol has developed into a family-class system, including cruisecontrol. java, cruisecontrol.net, and cruisecontrol. ruby and Other implementations that adapt to different language environments, and their powerful plug-ins and expansion capabilities are also comparable to those of many similar systems. Here, I will only introduce the family's cruisecontrol. Java, namely, cruisecontrol. Cruisecontrol is a good continuous integration server, but in ChinaCommunityThe general reaction is: its configuration is too troublesome and cannot be started. From this articleArticleAt the beginning, I will gradually introduce the cruisecontrol environment establishment and configuration, as well as some practices in continuous integration. We will start with the simplest way to use (stand-alone), so that you can quickly start your continuous integration journey without having to face the "strange" problem.
Good! Let's simply set up a continuous Integration Server.
1. My cruisecontrol version
- Cruisecontrol is a Java open-source project.Branch versionTo introduce its usage. The latest version of cruisecontrol is v2.7.1. This branch version is based on v2.7.1.
- This branch version contains a dashboard that allows you to easily view the build status of each project.
- This branch version also supports multiple build loops. You can deploy an independent build loop on multiple machines to build your own build grid.
2. Obtain the branch version of cruisecontrol.
To obtain this branch version, you can use the Subversion to detect it from the repository of cruisecontrol without any password. The command is as follows:
SVN checkout https://cruisecontrol.svn.sourceforge.net/svnroot/cruisecontrol/branches/cce/cruisecontrol/
3. Construct a cruisecontrol
0. You must install Java 1.4 on your machine, set java_home in the environment variables, and add Java/bin to the path. Cruisecontrol comes with ant, so you do not need to install it in advance.
- SlaveSource codeBuild a cruisecontrol
If you build a cruisecontrol from the source code, make sure that your machine can access the Internet. This is because you need to check some licenses during the build process. In addition, it is best to have SVN client software, because it will use javahl during construction.
In the cruisecontrol directory that just came out of checkout, there is a batch processing file named release. bat. When you run this batch file, you will find a compressed file named "cruisecontrol-bin-2.7.2-dev.zip" in the targetdirectory. Decompress it to a directory. Here we extract it to the C root directory. After decompression, the directory structure is as follows:
2. directly use the built cruisecontrol
If you do not want to do this, you can find the decompressed files in the binaryrelease directory and copy them to the corresponding directory.
4. Run cruisecontrol
Cruisecontrol can run on multiple application servers. Of course, it also binds an open-source application server, that is, Jetty 6. In order to establish our environment as soon as possible, we will temporarily use the jetty bound by it to quickly start our continuous integration journey.
Run the "cruisecontrol" command in the "cruisecontrol" directory. bat, it will start jetty6 by itself. After it is started in the console, you can access http: // localhost: 8080/dashboard in the browser, now you will see a sample project named connectfour displayed on the dashboard.
(If you are fast enough, you will findDashboardThe small square on turns from Gray to dark green. Why? Let's talk about it later .)
"Green" indicates that the project is built successfully. If you have multiple projects, you should see multiple small blocks.
Click the "builds" tab.BuildsPage. This page displays all projects in a list. Currently, there is only one project, so there is only one row in the list, as shown in:
When you click a project on this pageBuild detailPage to display the information of the last build of the project. All historical building information of the Project is displayed on the right side of the page. You will find that the connectfour project has two historical build versions, one being just built and the other being built two years ago. The information is from the log file of the project by cruisecontrol. Click either of the two build results to openBuild detailPage, showing the relevant building history information. As shown in:
In the next article, we will briefly introduce the cruisecontrol configuration file to prepare you for joining your own build project.