119 lines
8.8 KiB
HTML
Executable File
119 lines
8.8 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<title>CruiseControl.NET : Splitting the build</title>
|
|
<link rel="stylesheet" href="styles/site.css" type="text/css" />
|
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
</head>
|
|
|
|
<body>
|
|
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
|
|
<tr>
|
|
<td valign="top" class="pagebody">
|
|
<div class="pageheader">
|
|
<span class="pagetitle">
|
|
CruiseControl.NET : Splitting the build
|
|
</span>
|
|
</div>
|
|
<div class="pagesubheading">
|
|
This page last changed on Nov 25, 2004 by <font color="#0050B2">orogers</font>.
|
|
</div>
|
|
|
|
<p>As your codebase grows and your build starts to take an increasingly long time, it often makes sense to think about splitting your build process into a set of dependent builds (<shamless-plug>check out my paper "Scaling Continuous Integration" from XP2004 for some tips on how to do this</shamless-plug>). Currently, the main way to go about triggering dependent builds is to set up a separate project containing the secondary build process that you want to run. It can be triggered by changes to a file or folder that is being monitored by a <a href="Filesystem Source Control Block.html" title="Filesystem Source Control Block">FileSystemSourceControl</a>. Here's an example of what your <b>ccnet.config</b> file might look like:</p>
|
|
|
|
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
<pre class="code-xml"><span class="code-tag"><cruisecontrol></span>
|
|
<span class="code-tag"><project name=<span class="code-quote">"developerBuild"</span>></span>
|
|
<span class="code-tag"><sourcecontrol type=<span class="code-quote">"cvs"</span>></span>
|
|
...
|
|
<span class="code-tag"></sourcecontrol></span>
|
|
<span class="code-tag"><build type=<span class="code-quote">"nant"</span>></span>
|
|
<span class="code-tag"><buildfile></span>main.build<span class="code-tag"></buildfile></span>
|
|
<span class="code-tag"><targets></span>
|
|
<span class="code-tag"><target></span>compile<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>unit.test<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>publish.distribution<span class="code-tag"></target></span>
|
|
<span class="code-tag"></targets></span>
|
|
<span class="code-tag"></build></span>
|
|
<span class="code-tag"><triggers></span><span class="code-tag"><pollingInterval seconds=<span class="code-quote">"60"</span> /></span><span class="code-tag"></triggers></span>
|
|
...
|
|
<span class="code-tag"></project></span>
|
|
<span class="code-tag"><project name=<span class="code-quote">"customerBuild"</span>></span>
|
|
<span class="code-tag"><sourcecontrol type=<span class="code-quote">"filesystem"</span>></span>
|
|
<span class="code-tag"><repositoryRoot></span>C:\project\distribution<span class="code-tag"></repositoryRoot></span>
|
|
<span class="code-tag"></sourcecontrol></span>
|
|
<span class="code-tag"><build type=<span class="code-quote">"nant"</span>></span>
|
|
<span class="code-tag"><buildfile></span>integration.build<span class="code-tag"></buildfile></span>
|
|
<span class="code-tag"><targets></span>
|
|
<span class="code-tag"><target></span>acceptance.test<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>ncover<span class="code-tag"></target></span>
|
|
<span class="code-tag"></targets></span>
|
|
<span class="code-tag"></build></span>
|
|
<span class="code-tag"><triggers></span><span class="code-tag"><pollingInterval seconds=<span class="code-quote">"300"</span> /></span><span class="code-tag"></triggers></span>
|
|
...
|
|
<span class="code-tag"></project></span>
|
|
<span class="code-tag"></cruisecontrol></span></pre>
|
|
</div></div>
|
|
|
|
<p>The targets are meant to be illustrative of the types of things that you might want to put into the different builds.</p>
|
|
|
|
<p>As of CCNet 0.7.1, there is a new publisher called <a href="ForceBuildPublisher.html" title="ForceBuildPublisher">ForceBuildPublisher</a> that can be used to force build for a project on a local or remote ccnet server. The <a href="ForceBuildPublisher.html" title="ForceBuildPublisher">ForceBuildPublisher</a> can be set to force a dependent build depending on the status of the integration: whether it succeeded, failed or generated an exception. Here's what the above <b>ccnet.config</b> file would look like if you used this publisher:</p>
|
|
|
|
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
<pre class="code-xml"><span class="code-tag"><cruisecontrol></span>
|
|
<span class="code-tag"><project name=<span class="code-quote">"developerBuild"</span>></span>
|
|
<span class="code-tag"><sourcecontrol type=<span class="code-quote">"cvs"</span>></span>
|
|
...
|
|
<span class="code-tag"></sourcecontrol></span>
|
|
<span class="code-tag"><build type=<span class="code-quote">"nant"</span>></span>
|
|
<span class="code-tag"><buildfile></span>main.build<span class="code-tag"></buildfile></span>
|
|
<span class="code-tag"><targets></span>
|
|
<span class="code-tag"><target></span>compile<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>unit.test<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>publish.distribution<span class="code-tag"></target></span>
|
|
<span class="code-tag"></targets></span>
|
|
<span class="code-tag"></build></span>
|
|
<span class="code-tag"><triggers></span><span class="code-tag"><pollingInterval seconds=<span class="code-quote">"60"</span> /></span><span class="code-tag"></triggers></span>
|
|
<span class="code-tag"><publishers></span>
|
|
<span class="code-tag"><forcebuild></span>
|
|
<span class="code-tag"><project></span>customerBuild<span class="code-tag"></project></span>
|
|
<span class="code-tag"></forcebuild></span>
|
|
<span class="code-tag"><serverUri></span>
|
|
tcp://localhost:21234/CruiseManager.rem
|
|
<span class="code-tag"></serverUri></span>
|
|
<span class="code-tag"></publishers></span>
|
|
...
|
|
<span class="code-tag"></project></span>
|
|
<span class="code-tag"><project name=<span class="code-quote">"customerBuild"</span>></span>
|
|
<span class="code-tag"><sourcecontrol type=<span class="code-quote">"test"</span> /></span> <span class="code-tag"><span class="code-comment"><!-- unfortunately necessary as sourcecontrol is a required element --></span></span>
|
|
<span class="code-tag"><build type=<span class="code-quote">"nant"</span>></span>
|
|
<span class="code-tag"><buildfile></span>integration.build<span class="code-tag"></buildfile></span>
|
|
<span class="code-tag"><targets></span>
|
|
<span class="code-tag"><target></span>acceptance.test<span class="code-tag"></target></span>
|
|
<span class="code-tag"><target></span>ncover<span class="code-tag"></target></span>
|
|
<span class="code-tag"></targets></span>
|
|
<span class="code-tag"></build></span>
|
|
... <span class="code-tag"><span class="code-comment"><!-- no trigger is required as the build will always be forced --></span></span>
|
|
<span class="code-tag"></project></span>
|
|
<span class="code-tag"></cruisecontrol></span></pre>
|
|
</div></div>
|
|
|
|
<p>Note: that you can easily change the serverUri property to refer to a ccnet server running on a remote machine if you want to distribute your build process.</p>
|
|
|
|
|
|
<p>See also <a href="Enterprise Continuous Integration with Binary Dependencies example.html" title="Enterprise Continuous Integration with Binary Dependencies example">Enterprise Continuous Integration with Binary Dependencies example</a> for some other examples demonstrating how to do this.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><font color="grey">Document generated by Confluence on Mar 14, 2009 02:55</font></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html> |