We have recently launched our internal Continuous Integration environment for use in our many Sitecore projects. The setup is pretty straightforward with NAnt, CruiseControl.NET and Subversion in beautiful harmony. Because of the integration with Visual Studio, we would have liked to use Visual Studio Team System, but the pricing deterred us. When nAnt, CC.NET and Subversion are so cool why on earth has Microsoft set their price so high? In my view, they could have cornered the entire .NET based market by having a more relaxed price policy.
Well back to the point: We have tried to implement an environment which helps our developers and increases productivity, by removing some of the mundane tasks of developing in Sitecore. I am real excited about the prospects, so I would like to share some of the cool features we’ve implemented:
We have collected an entire module library, including all newer version of Sitecore, all Sitecore modules as well as all our internal modules. This means that when starting a new project, or when implementing a new modules in a project, the customer merely points the build configuration to which modules the project uses, and – hey presto – the module is included in the project. This includes code files, Sitecore packages, configuration file changes (see later) and all other related files. The point is – the project points to a module, and the module is responsible for integrating itself in the project.
Configuration files management:
We have previously had a lot of hassle trying to maintaining changes in the Sitecore web.config as well as all the other configuration files. Trying to keep all config files in all project targets (dev, test, prod, etc.) synchronized is a pain. Therefore we have developed a nAnt task which when running the build, merges project/module specific changes into Sitecores standard configuration file. I.e. when a full build is run:
- The standard Sitecore configuration files are copied from the Module Library (from the correct version of Sitecore)
- The relevant Sitecore modules standard configuration changes are merged into the configuration files
- Dependant on which target the build is for, the project specific configuration changes (connection strings etc.) are merged into the configuration files.
A side from keeping the configuration files synchronized, this also means that when upgrading Sitecore (a task which basically to point the project to the new version in the module library) all Sitecore’s new or changed configuration settings are automatically included.
Our CI environment also implements Subversion, MSBuild, FxCop, automatic test server deployment and installation versioning/packaging.
One of the problems we are facing with Sitecore and CI is the amount of functionality and configuration hosted in the Sitecore database. We’ve through hard about e.g. integrating the Sitecore packager with the build environment, but dropped the idea. Please let me know if you’ve done something similar.
As you can hear i’m pretty excited about this, and would really like to make it as cool as possible – so throw me a comment if you have experiences with CI/build environments and Sitecore.