How should Courier be used as part of a CI build?

Abigail: 20 May 2022

I am looking at an existing setup of Sitecore that is using Courier as part of a continuous-integration process.

The process is currently:

  • Commits to a particular branch kicks off a Team City build
  • The build contains a TDS project of serialized items
  • Courier is executed to generate an .update package that compares the current state of serialized items to a copy of last state of serialized items
  • The .update packaged is NuGet packed along with the Website build for Octopus Deploy
  • Finally, the current serialized items are copied to be compared against during the next build

The advantage of this is that the .update packages generated are very lean. However, they completely depend on the previous Octopus Deploy deployment having succeeded as they are assuming the current state of items in Sitecore. If a build fails, or is even skipped, then successive builds won't be correct.

Is this a typical use of Courier, even with this problem?

A more robust method could be to just package and deploy all serialized items and then use Courier as part of the deployment process (rather than build) to generate an .update package at deployment, perhaps against a previous collection of serialized items that was known to be installed without error.

Is there a means of doing this efficiently that compares to the live database without having to rely on a previous set of serialized items?

Eleanor: 20 May 2022

An options could be not to use courier, but to use TDS delta builds, considering the fact that you already use TDS, by going back to a certain date in time. This will also keep the packages small.

You could, by the way, use TDS package deployer to automatically install these packages as well.(