Question

Ok, I know this is not a programming question.. but I'm sure its related to improving productivity of programmer.

I am trying to use CruiseControl http://cruisecontrol.sourceforge.net/ to implement continuous integration in our work flow. Each developer has separate machine to develop with.. with one centralized db server. We work mostly with Visual Studio to develop asp.net applications. And we have a centralized SVN server on the same system we're having db server.

Now I'm trying to integrate Cruise Control, but not sure what is the best way. I am particularly not able to decide...

In solution file path, do we need to pass a local path? So, in that case should we copy a one copy of project source code on server to execute? Or is there any better automated way to achieve this? Can we use SVN URL in solution file path...?

I'm sure there is must be a way to do this fully automated, but how?

Était-ce utile?

La solution

In the project build node you will need to define the local path for the build server and the SVN URL so CruiseControl can grab the code from the centralized SVN server. You can use NANT or MSBuild plugin to define specific configurations for the build server to avoid mis configuration with the server. Below is an example of the ccnet.config file that need to be defined in the build server

<project name="Calculator-Service">
    <schedule type="schedule" sleepSeconds="15"/>
    <modificationDelaySeconds>2</modificationDelaySeconds>
    <sourcecontrol type="svn">
      <trunkUrl>svn://svn.mycompany.com/myfirstproject/trunk</trunkUrl>
      <workingDirectory>C:\ccnetexamples\eci\working\service</workingDirectory>
    </sourcecontrol>
    <build type="nant">
      <executable>C:\ccnetexamples\eci\working\service\tools\nant\nant.exe</executable>
      <baseDirectory>C:\ccnetexamples\eci\working\service</baseDirectory>
      <buildFile>nant.build</buildFile>
      <targetList>
        <target>ci</target>
      </targetList>
      <buildTimeoutSeconds>300</buildTimeoutSeconds>
    </build>
    <publishers>
      <xmllogger>
        <logDir>..\web-service\log</logDir>
      </xmllogger>
    </publishers>
</project>

Autres conseils

look at http://www.cruisecontrolnet.org/projects/ccnet/wiki/Configuration

There is a step by step guide for Build Server Scenarios. with build script and ccnet.config examples.

IMNO, the best way to think of CC.NET is a "super fancy msbuild.exe" executor.

Write a msbuild (.proj) and put the majority of your logic in it.

Including "pull code down from svn and place it in this local directory"

Then you cc.net task will pull down this .proj file....and then use the msbuild.exe task to execute that .proj file.

Since you only have a very small amount of logic in the cc.net proprietary tasks, if you pick another CI tool, its not a hard transition.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top