Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orchard CMS module development and continuous integration with TeamCity

I've been developing with Orchard CMS for a few months now (and love it) and the time for launching my website is fast approaching. So far I've just been developing solo out of my BitBucket repo, forking where necessary, not doing anything too fancy. Once I have released though I really need to have a handle on exactly what versions of my modules and themes are in use in production. I figure versioned packages out of my build server is the best way to achieve this.

Currently my repo consists of the source for the entire Orchard instance (minus the App_Data folder), with a solution file that includes the projects that are my modules and themes. My modules take on dependencies of other modules from the App_Data/Dependencies folder.

My question is, is this the best approach to achieve Continuous Integration?

I have my solution building under TeamCity, but I don't include the App_Data folder in my repo, so I need to at least load the setup page so the Dependencies directory gets populated (which doesn't happen on my build server for some reason? Seems only dynamic compilation kicks in for everything?)

Any thoughts or assistance would be greatly appreciated.

UPDATE:

I have decided I will add a lib folder to my solution and store all dependent assemblies there. I will then have my repo consist of only the projects required for my modules / themes. The CI server will then have no problems building the solution, and I can just clone the repo into an Orchard instance for easy development (this means my solution will have to contain a Modules and Themes directory).

like image 424
Brendan Avatar asked Nov 23 '11 11:11

Brendan


1 Answers

I used the following approach.

  • add Orchard binaries to the repository without any source codes, just in the for they are distributed at the orchard project site
  • create my solution and all related projects in separate directory, so at the moment dir structure looks like this:

    enter image description here

  • then place your modules projects under orchard/modules folder with all sources and .proj files

  • add references from your module projects to orchard/bin for any orchard-specific stuff

  • add module binaries manually to App_Data/Dependencies folder to be able to reference them

One of the improvements of this approach is to turn off dynamic compilation and store only module binaries, but this will require configuration of the output bin path and additional actions in the build script.

Benefits

  • You don't have any orchard sources in your repository except of the modules (but this is solvable by turning off dynamic compilation).
  • You can easily upgrade orchard binaries and modules almost independently
  • The build takes less time
like image 71
Restuta Avatar answered Sep 17 '22 13:09

Restuta