How to configure CruiseControl.NET Control Panel (CCNet)?

I am new to CCNet ...

I would like to configure the CCNet web dashboard to add a checkbox next to the "Force Build" button to indicate whether a particular assembly is for release or not.

Please let me know if this setting is possible. If so, provide some guides or article links to get started.

+4
source share
1 answer

I think that doing what threatens you will be a huge pain, because you will need to hide some CC.net projects (let's say debugging) and still create them if the checkbox is selected. It would be inconvenient to go to the project page with history and magazines. If you thought about editing the configuration of the ccnet project on the fly, do not forget that you will have to restart the service to get it up to date. Finally, your changes may be ok for the control panel, but this will cause a problem with cctray.

Instead, I would do two different projects: one building in debug mode and one in release. That would be much simpler and more understandable. For example, you might have a debugging project whose assemblies are launched from source control and release repository updates, which is created manually or at night.

EDIT
For two different projects, I would make a block with common code (for Release and Debug) with two dynamic parameters (say, Conf and OutPath). I would also write a third project that runs a db script, this third project will run every successful Release compilation. By doing this, you will be able to separately build the Debug / Release build, running the script separately (for the power build) and each Release build, and finally checking the script (with each commit). It will look like this:

<cb:define name="MyProject-Block"> <project name="MyProject - $(Conf)" queue="General" queuePriority="100"> <workingDirectory>D:\MyProject</workingDirectory> <triggers> <intervalTrigger seconds="300"/> </triggers> <cb:state-block/> <cb:svn-block svnpath="MyProject"/> <tasks> <msbuild> <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable> <workingDirectory>D:\MyProject</workingDirectory> <projectFile>MyProject.sln</projectFile> <buildArgs>/p:Configuration=$(Conf);OutputPath="$(OutPath)"</buildArgs> <targets>Clean;Build</targets> <timeout>600</timeout> <logger>F:\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger> </msbuild> </tasks> <publishers> <xmllogger/> <statistics /> <modificationHistory onlyLogWhenChangesFound="true" /> <cb:email-block/> </publishers> </project> </cb:define> <cb:MyProject-Block Conf="Debug" OuputPath="..\Compil\Debug" /> <cb:MyProject-Block Conf="Release" OuputPath="..\Compil\Release" /> <project name="MyProject. DbScript" queue="General" queuePriority="110"> <workingDirectory>D:\MyProject\DB</workingDirectory> <triggers> <projectTrigger project=" MyProject - Release"> <triggerStatus>Success</triggerStatus> <innerTrigger name="Eurosport.Business" type="intervalTrigger" seconds="60" buildCondition="ForceBuild" /> </projectTrigger> <intervalTrigger seconds="300"/> </triggers> <cb:state-block/> <cb:svn-block svnpath="MyProject/DB"/> <tasks> <!-- Executing the script here --> </tasks> <publishers> <xmllogger/> <statistics /> <modificationHistory onlyLogWhenChangesFound="true" /> <cb:email-block/> </publishers> </project> 
+6
source

All Articles