I want to use CCNetRequestSource which is the name of the trigger which launches the MSbuild task. For example when "toto" trigger is executed I want to launch the "toto" target on MSBuild. Is it possible?
It's for a nightly build, I want to create MSI file and doc at this time, I created the specific target in MSBuild but I don't found how to execute it only when a specific trigger is thrown.
There is msbuild syntax that should help you with this. Take a look at the following links:
You should try adding a facade build file for CruiseControl to call that will delegate to your solution files with a construct similar to the following:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<!-- If the toto CCNETRequestSource was submitted -->
<When Condition="'$(CCNetRequestSource)'=='toto'">
<PropertyGroup>
<Target Name="toto">
<MSBuild Projects="MyProject.sln" Properties="Configuration=Debug" Targets="toto" />
</Target>
</PropertyGroup>
</When>
<Otherwise><!-- Place your standard build call here --></Otherwise>
</Choose>
</Target>
</Project>