This document provides information on core files and directories in a CI Factory project.
Directory Structure
ProjectName
This is the name of your project.
Codeline or Branch Name
This is something like Current, Trunk, 1.0, 1.1, 2.0, etc.
Build
This is where all the files used to build your product are housed.
Product
This is the root of the directory structure that contains all the files that you create that make up your product. Some people like to name this folder src.
Install
This directory contains scripts, projects, and or code for creating and installer of your product.
Production
This directory contains the production code for your product.
Unit Test
This directory contains the source code for unit tests.
Third Party
This directory contains tools and or libs that your product needs to build. Remember that build means not just compile but tet as well if not more. If you are used to a libs and tools folder it might help you to think of this folder as a merger of the two, lib + tools = Third Party.
Build
ccnetproject.xml
This is the ccnet project configuration. It contains references to dtd entities that are defined in the file Entities.xml.
CCNETServer.Bat
This file starts the ccnet server console app. If you are adding customizations to the build scripts it may be important to know that this batch file sets the PATH environment variable to a very basic:
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Common.Build.xml
This file contains common targets and a few properties that must be calculated durring the SetUp phase of the build. There is target named Common.CreateCCTraySfx in this file that you can call to rebuild the cctray setup exe. This is useful if you have had to change the port that CCNet runs on. You can also modify this target to point at an Aggregator before rebuilding the cctray installer.
CreateBranch.xml
This is a NAnt script for creating branches. See the documentation dedicated to this script.
Entities.xml
This file contains dtd definitions. These dtd entities are referenced from many files.
Main.build.xml
This is the main build script. It contains the sub main for the build scripts: a target named triggered.
NAnt.xsd
This file provieds intellisense for NAnt in Visual Studio.
OpenSolution.bat
This file can be used to open the build solution. If you wish to execute NAnt scripts inside Visula Studio you should use this batch file to open the IDE and solution as it will included NAnt in the PATH before starting studio.
Post.build.xml
This is the post build NAnt script. It executed asynchronously at the end of the CCNet build, it does not block/prevent the build from completing. If you add customizations into this script be careful, a new build can begin while this post build script is still executing.
Post.Shim.xml
This is the shim for the real post build script, it provides the asynchronous magic...
Properties.build.xml
This is the main properties file for the NAnt script.
Scratch.build.xml
This is a file for playing with, testing, and generally executing arbitrary NAnt script. It is not used by the build process. It is for a human. Please read this
short blog post for more information: NAnt Scratch.
SetupIIS.xml
This is a NAnt script that will configure IIS to host this CI Factory project, the CCNet dashboard.
UpdatenAntSchema.bat
This batch file will execute the UpdateNAntSchema.xml NAnt script to, well, update the NAnt.xsd and intellisense for Visual Studio.
UpdatenAntSchema.xml
A NAnt script to update the NAnt.xsd.
Product
Build.bat
This script accepts parameters: Build, Rebuild, Compile, Recompile, and
Test. The default parameter is Build, meaning that it can be called
with passing anything. The first thing this script does regardless of
the parameter is perform an update from source control. It will update
the Build, Product, and Third Party directories.
Build calls Compile and Test.
Rebuild calls Recompile and Test.
Compile calls the Compile.CompileSource target and Ant.Build if Ant is part of the CI Factory project.
Recompile deletes all the bin and obj directories then calls Compile.
Test calls the Unit Test package's target UnitTest.RunTests.
NoUpdateBuild.bat
This script is identical to the Build.bat script except that it does not perform and update from source control.
Test.bat
This script will run all the unit tests.
Personal.Build.xml
This is the glue between the previous three batch files and the Packages in the Build Directory.
Compile.Environment.xml
These files allows you to override the default environment
variables for use during the compilation of the build. It provides
several advantages, the main one being that environment variables car
version controlled.
OpenCommandPrompt.bat
This script will open a command prompt with all it's environment
variables set as defined in the *.Environment.xml or with the
defaults. NAnt, and Ant if it is part of your Project, are in the path
so you can more easily use these tools.
OpenSolution.bat
This file exists in the main distrobusion of CI Factory. The Power Tools version calls the OpenSolution.Script.xml.
OpenSolution.Script.xml
This file is useful if you are a user of TestDriven.Net. It will
set your Registry values for TD.Net to the installation of MbUnit in
the Third Party directory. This allows you to work with multiple
versions of MbUnit.
|