June 18, 2014

Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus

This week I have setup a complete fully automatic continuous integration for a website in Sitecore.

I have use the following architecture

Here is the workflow:
  1. The TFS 2013 Build Server get the sources from TFS 2013 Source Control
  2. The TFS 2013 Build Server execute a pre-build powershell to:
    1. Rename the versions into the AssemblyInfo.cs
    2. Rename the versions into the NuSpec files
  3. The TFS 2013 Build Server execute a msbuild command. This msbuild command do the following stuff:
    1. Create the Team Developpment for Sitecore (TDS) packages
    2. Create the Octopus nuget packages
    3. Push the Octopus nuget packages on the nuget server
  4. The TFS 2013 Build Server execute a post-build powershell to:
    1. Create an Octopus release
    2. Deploy the Octopus release on integration. This will:
      1. Send an email to the administrator
      2. Cleanup the old files
      3. Deploy my Octopus nuget packages of code
      4. Deploy my Octopus nuget packages of TDS
      5. Install the SQL Scripts
      6. Install the TDS packages and modules


The configuration of those different steps are detailed here:
  1. Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Architecture
  2. Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Step 1: Customize the TFS workflow
  3. Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Step 2: Configure TFS
  4. Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Step 3: Configure octopus
  5. Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Step 4: Align the version number

3 comments:

  1. Hey Benjamin, I love your work! I dont often make requests but do you happen to have an easier way todo Sitecore upgrades? Do you use config deltas? Also, do you have a better way todo a sitecore environment setup? For example, a powershell script that could checkout files from SVN, copy sitecore files from another location, config IIS etc...?

    ReplyDelete
    Replies
    1. Normaly I never change the original web.config I use the transform with the slow cheeta visual studio plugin tu modify the .config files.
      About the setup, you have multiple solutions:
      - Install it via powershell : advantage you have the full control on every steps but it isn't easy to implement. If you need I have some utils scripts .that I can share
      - Use SIM: https://marketplace.sitecore.net/en/Modules/Sitecore_Instance_Manager.aspx This is probably the easiest solution.
      - Mix of the 2 : Use SIM for the sitecore stuff and powershell for the code checkout.

      Delete
  2. Hey Benjamin, this is very helpful and we are going to use sitecore first time with TFS 2010 and TDS. We are looking to implement CI/CD and not sure whether TFS 2010 would work with TDS or not?
    Could you please help me with hardware requirements to setup all CI/CD with Sitecore TFS CI/CD?

    ReplyDelete