10 October, 2023

XM Cloud Build Configuration & Post Deployment Actions

In the SaaS world, we have less control on what we can do and what to deploy. This is because SaaS applications are hosted and managed by the vendor, not by the customer. This means that the customer does not have the same level of access and control over the application as they would if it were deployed on-premises. Sitecore XM Cloud is similar, but the XM Cloud build configuration allows for a few additional capabilities.

The file is an XM Cloud build configuration file that contains a set of configurations that allow customers to control what to build, what to deploy, and various options for post-deployment actions.

There are five configuration objects the build configuration right now.

  1. deployItems:

    Gets the list of serialization module names to be deployed, creates Items as Resources (IAR) file and deployed. No support for roles in this case so if there are any roles, you will need to use Post Deployment actions (scsModules).

  2. buildTargets:

    Enables you to define which project or solution to build. Otherwise, defaults to the solution file available in the root folder. 

  3. renderingHosts:

    To configure the location for the rendering hosts and sites they map to. More information about the rendering host configuration can be read here. 

  4. tranforms:

    To process XDT transformation of your configuration. Wildcard can be used for the path. 

  5. postActions:

    Various operations can be performed after the deployment stage in the XM Cloud deployment process. The available operations are explained below. 

Post Action Operations:

  1. CM Warm-up -  warmUpCm

    This option allows you to send GET requests to a set of URLs to start up and run your CM environment. You can also use this section to call a dedicated set of pages in your CM environment to perform any business-critical actions.

    In addition, you can create ASPX pages and trigger them to initiate any tasks. For example: 
    - triggering a task to pull content from 3rd party system. 
    - triggering a job to execute a Sitecore PowerShell script
    - triggering an email to content authors
    - ... and many more

    It would be really nice if we have a way to configure and trigger Sitecore Authoring and Management GraphQL API in post deployment actions. 

  2. Schema Population -  populateSchema

    Populate the managed schema for specific indexes by listing their names.

  3. Reindexing - reindex

    Reindex specific indexes by listing their names.

  4. Publishing - publish

    You can either publish a path and sub items with certain languages or specific items alone. You can specify whether it should be smart or republish. 

  5. SCS module deployment action - scsModules

    You can also use this section to push the content using Sitecore Content Serialization. Specify the modules names to be synched. In this section, you can push the roles as well. 

Currently, customers cannot create custom post-deployment actions in XM Cloud. They must use the out-of-the-box options available in the build configuration.

It would be really nice if we have a way to configure and trigger Sitecore Authoring and Management GraphQL API in post deployment actions. 

When you create a deployment request from the CLI, you can wait for post-deployment actions to complete and see the status or progress in CLI real time. By default, CLI will skip waiting for post-deployment actions. However, you cannot prevent these steps from execution if they are part of the XM Cloud build configuration.

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }