Question

We use CCnet to do Continuous Integration for .NET web application and for the most part it works really well. Our builds are starting to take a bit of time because our primary Visual Studio Web Site project takes a looong time to compile (Validating Web Site non-sense) though so one optimization that we thought up of was to skip the step of pre-compiling the web site on HTML, JavaScript, and CSS changes (and other non-ASP.NET types that don't affect the compilation but need to copied around). This would work for us in the majority of cases because the majority of our changes are HTML, JavaScript and CSS.

Is there any way in CCnet to identify what the type of changes were (white-list, black list, etc) and only run the MSBuild of the web site project on those types of changes? I've looked into the documentation and it seems like an all or nothing kind of thing, but I thought it would be worthwhile to ask and see if StackOverflow people had any suggestions.

(And yes, I realize that a longer term solution is to make it so that the web site project compiles faster, but that requires a lot of refactoring work which we are not willing to commit resources to at this point.)

Was it helpful?

Solution

The only idea I can think of is:

  1. You have access to certain CC.NET variables.

http://build.sharpdevelop.net/ccnet/doc/CCNET/Integration%20Properties.html

If you write your build logic in msbuild, you can check these values (listed in the url above). I'm not sure if there are any in there that meet your requirement.

I think of CC.NET as a "big fancy msbuild.exe caller"...........

You can look at these as well.

http://build.sharpdevelop.net/ccnet/doc/CCNET/Dynamic%20Parameters.html

I don't think you can do what you want, but here are some hints.

OTHER TIPS

I'm not sure if I do understand correctly. If you don't like to call the build on changes to css, html etc, maybe the filtered source control block would do the job?

If you need to do something even if change concerns css, html etc, just skip some step (precompilation) then I'd probably just divide the whole thing into 2 projects, connected with the filtered source control for one of them (to exclude precompilation) and the other one to do all the rest.

Alternatively, maybe you could write your own task for this, you could probably derive it from conditional task, or just write your own condition (I've never written any task so can't advise any more here...).

One last workaround I can think of - in the conditional tasks there is BuildCondition block - you can execute certain task (precompilation) for example only on force build, so regular build would do just all the rest, and when you know you also need precompilation you'd need to manually force the build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top