CakeCake BuildCommerceSitecore

Build And Package Sitecore Commerce with Cake

Cake is really useful for building and packaging .net solutions(both net framework/core). In the world of Sitecore where Helix is the first design choice, Cake can be used to build and package the Sitecore solutions.

Habitat sample has cake scripts that can be used to build Sitecore solutions if they follow Helix principles however, Habita sample uses PowerShell scripts for Sitecore Commerce. While working on a Sitecore Commerce project, I decided to write Cake build, here is a list of Tasks I created. You can access the code repository here: https://github.com/isyedakhtar/SitecoreCommerce

CakeBuild

 

  1. Default Task For Local BuildsThis task is only for developer’s local machines. It does the following
    1. Clean Solution
    2. Build Solution
    3. Run Sonarq analysis(optional)
    4. Publish Commerce Engine Project
    5. Copy Published Commerce Engine Project to all Roles
    6. Transform Policies – I am using JDT transformation for policies.
    7. Replace Variables with actual values in transformed policies
    8. Bootstrap
  2. Quick-Deploy For Local BuildsThis task is also for developer’s local machines. It does everything same as Default except running bootstrap.
  3. Build-Nuget For Building and Packaging: This task is used mainly on build agents like Teamcity etc where we build the solution and create nuget package. Later on, this package is used by deployment tools like Octopus to run the deployment. It does the following
    1. Clean Solution
    2. Build Solution
    3. Run Sonarq analysis(optional)
    4. Publish Commerce Engine Project
    5. Transform Policies
    6. Create a Nuget Package

Leave a Reply

Your email address will not be published. Required fields are marked *