Setting up from scratch Part 01

简介: 原文:http://confluence.public.thoughtworks.org/display/CCNET/Setting+up+from+scratch++Part+01   Added by Ruben Willems , last edited by Rube...

原文:http://confluence.public.thoughtworks.org/display/CCNET/Setting+up+from+scratch++Part+01

 
Added by Ruben Willems , last edited by Ruben Willems on Sep 29, 2007  (view change)

We'll be setting it up step by step, so this will be a real step by step approach. The reason is you can see what the benefits are of the setups used in this document.
The first parts will seem overdone for users who used CCNet before, but it is intended for the real starters. Later parts contain tips/situations for people with the basic knowledge.

Typically a build system consists of 2 servers and X development machines, they can be on different physical machines, but they can also be hosted on 1 machine.
Or 1 physical machine with virtual machines on it, everything is possible

These 2 servers are :   
° Build server  : referenced as BuildServer
° Source Control server : referenced as SourceControl

For this example the setup will be on 1 machine, so everybody can follow this tutorial without having to maintain multiple PC's.

The easiest way to set things up is to respect the following installation order :
° windows
° IIS
° .Net framework
° Visual Studio
° extra tools (Nant, Testdriven.Net, NCover, ...)

Step 1 : Installing CCNet

Since it has an installer, it is in fact : setup, next, next, next, ...
Once this is done, you will have :
° a new folder in \Program Files : CruiseControl.Net
° a shortcut on the desktop : CruiseControl.Net
       This shortcut will start the build server.

Step 2 : Folder structure

Make the following folders

Folder Name Purpose
c:\Integration will contain the integration logs, artifacts, sources, ...
c:\Repository will contain the repository of our source control
c:\Projects will contain checked out sources to work with


note : this is not the best folder structure for sources, but for these example it will do fine.
          for setting up development trees, see Tree Surgeon (http://www.codeplex.com/treesurgeon),  CIFactory (http://www.cifactory.org/joomla), ...




 

Step 3 : First basic CCNet project

This project is just for playing around a bit with cruisecontrol, without having to do any real coding.
We'll just use a batch file, and play a bit with that.
Make a subfolder in c:\projects, named Example01
Create a command script named 'test.cmd' with the following contents

@echo off
set

 

If you run this script, you'll see all the environment variables of your machine.

Step 4 : Configuring the build server

Start the build service, (there is a desktop icon) you will see a command window wit the following :

[CCNet Server:DEBUG] The trace level is currently set to debug.  This will cause CCNet to log at the most verbose level,
which is useful for setting up or debugging the server.  Once your server is running smoothly, we recommend changing
this setting in C:\Program Files\CruiseControl.NET\server\ccnet.exe.config to a lower level.
[CCNet Server:INFO] Reading configuration file "C:\Program Files\CruiseControl.NET\server\ccnet.config"
[CCNet Server:INFO] No projects found
[CCNet Server:INFO] Registered channel: tcp
[CCNet Server:INFO] CruiseManager: Listening on url: tcp://192.168.131.72:21234/CruiseManager.rem
[CCNet Server:INFO] Starting CruiseControl.NET Server



Since there are no projects, we'll add one for this simple script. Leave the CCNet server running, it will pick up the changes to the config file after every save.
Modify CCNet.config, found in \program files\CruiseControl.Net\server
Enter the following text :
<cruisecontrol>
    <project>
        <name>SimpleExample</name>

	<triggers />

	<tasks>
	    <exec>
		<executable>c:\projects\test.cmd</executable>
	    </exec>
	</tasks>
    </project>
</cruisecontrol>

 

You'll see that the command window of the server added the following lines.

[680:INFO] Configuration changed: Restarting CruiseControl.NET Server
[680:INFO] Reading configuration file "C:\Program Files\CruiseControl.NET\server\ccnet.config"
[SimpleExample:INFO] Starting integrator for project: SimpleExample


 

Now you can also browse to the dashboard,

open your browser and surf to http://localhost/ccnet
you will see the project : SimpleExample

Press the 'Force' button to force the build. Next press 'Refresh Status' to view the result.

You see that the build was successfull

Clicking on the project name 'SimpleExample' will show a page with project related information. From there on you can go to individual builds.

This shows how to set up a very basic project in CCNet, the next topic will cover :

° improving the project setup
° setting up source control monitoring
° getting information about builds

相关文章
使用parted创建大分区时 mkpart Warning: The resulting partition is not properly aligned for best performance.
fdisk不能创建大于2T的分区,创建大分区得用parted,我在用parted创建分区时遇到下面的警告提示
256 0
|
分布式计算 Java Spark
Optimizing Spark job parameters
Optimizing Spark job parameters
267 0
|
开发工具 git
报错解决:your local changes to the following files would be overwritten by merge: .idea/workspa
报错解决:your local changes to the following files would be overwritten by merge: .idea/workspa
473 0
报错解决:your local changes to the following files would be overwritten by merge: .idea/workspa
|
前端开发 开发工具 git
|
Java Maven
IDEA报错Target level &#39;1.6&#39; is incompatible with source level &#39;1.7&#39;
解决IDEA 编译级别 Error:java: Target level '1.6' is incompatible with source level '1.7'. A target level '1.7' or better is required 打开之后发现有一个编译级别设置的不对 更改如下: 如果上面的方法还是不行的话,就建议你改一下pom文件中的maven插件编译级别,可以通过搜索所有的pom.xml,1.6这个关键词,就看出来了。
1451 0
|
JavaScript 前端开发
Advanced Log Parser Charts Part 1 - Working With Configuration Scripts
http://blogs.msdn.com/b/carloc/archive/2008/08/07/charting-with-logparser.
996 0