6
votes

We are just beginning development and implementation for dynamics crm 2011 on premises. Is it possible to implement automation for code check-in to promote code from development to test systems? It looks like this would involve export/import of unmanaged solutions containing the development code that was checked in. I have not been able to find APIs around this functionality.

If that is not possible, how close can you get? It looks like there are APIs to automate the uploading of web resources and plug-ins (e.g. webresourceutility in the sdk), but the web resources still need to be manually linked to the form they are to be used on (in the case of javascript etc). Has anyone made progress in automating parts of their CRM environments?

for reference, we're using vs 2010 & tfs 2010 using MSuild for current continuous integration.

2

2 Answers

5
votes

We have a few techniques that provides us a very solid CI structure.

Plugins

  • All our Plugins are CI Compiled on Check-In
  • All plugin code we write has self-registration details as part of the component.
  • We have written a tool which plays the Plugins to the database, uninstalling the old ones first based on the self-registration details.

Solution

  • We have an unmanaged solution in a Customisation organisation which is clean and contains no data. Development is conducted out of this organisation. It has entities, forms, Jscript, Views, Icons, Roles, etc.
  • This Customisation database has all the solutions we've imported from 3rd parties, and customisations are made into our solution which is the final import into a destination organisation.
  • The Solution is exported as managed and unmanaged and saved into TFS
  • We store the JScript and SSRS RDLs in TFS and have a custom tool which plays these into the customisation database before it is exported.
  • We also have a SiteMap unmanaged Solution which is exported as unmanaged (to ensure we get a final resultant Sitemap we are after)

Deployment

We have a UI and Command Line driven tool which does the following :-

  • Targets a particular Organisation
  • Imports the Customisation managed solution into a selected environment. e.g. TEST. Additionally imports the unmanaged Sitemap.
  • Uninstalls the existing solution which was there (we update the solution.xml file giving it a name based on date/time when we import)
  • Installs/Uninstalls the Plugin Code
  • Installs any custom SQL scripts (for RDLs)
  • Re-enables Duplicate Detection Rules
  • Plays in certain meta-data we store under source control. e.g. Custom Report entity we built which has attachments and XML configuration.

It isn't entirely perfect, but via command line we refresh TEST and all the Developer PCs nightly. It takes about 1 hour to install and then uninstall the old solution per organisation.

4
votes

We use CI extensively for Dynamics CRM. For managing solutions, I would recommend using a "clean" Dynamics CRM implementation which will be the master for your solutions and also for your "domain data". See http://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.importsolutionrequest.aspx for importing solutions. Also check out - http://msdn.microsoft.com/en-us/library/hh547388.aspx