SitecoreDXG Documention
  • SitecoreDXG: The Documentation Experience Generator
  • Overview
    • SitecoreDXG: The Documentation Experience Generator
    • Comparison with SitecoreUML
    • CI/CD Integration
    • Helix Dependency Validation
  • Getting Started
    • Compatibility and System Requirements
    • Installing SitecoreDXG
      • General Installation
        • 1. Install the SitecoreDXG Generation Service
        • 2. Install RabbitMQ
        • 3. Install the SitecoreUML Service for Sitecore
        • 4. (Optional) Configure the Documentation Configuration Item for your Solution
        • 5. Install the Default RabbitMQ Middleman in a Custom Location
        • 6. (Optional) Integrate SitecoreDXG into your CI/CD Pipeline
      • Developer Installation
        • 1. Install the SitecoreDXG Generation Service for Developers
        • 2. Install RabbitMQ for Developers
        • 3. Install the SitecoreUML Service for Sitecore for Developers
        • 4. (Optional) Configure the Documentation Configuration Item for your Solution
        • 5. (Optional) Install the Default RabbitMQ Middleman for Developers
        • 6. (Optional) Integrate SitecoreDXG into your CI/CD Pipeline for Developers
    • Upgrading and Downgrading
    • Downloads
    • Using SitecoreDXG
      • Using the Default RabbitMQ Middleman and Trigger
        • Using the DocumentationConfiguration Object
      • Using the Provided AWS S3 Deploy Completion Handler
      • Using the Provided Azure Blob Storage Deploy Completion Handler
  • Architecture
    • Architecture Overview
    • Roles
      • Role Combinations
    • Components
    • Plugins
      • Trigger Plugins
      • Completion Handler Plugins
    • Middlemen
    • Understanding the Default RabbitMQ Middleman and Trigger
  • How To
    • CI/CD Integration
      • Integrating SitecoreDXG into your CI/CD Pipeline
      • Integrating the Default TeamCity RabbitMQ Meta-Runner
    • Creating a Custom Trigger
      • Executing Documentation Generation
      • Executing Meta-Data JSON Generation
    • Slack and Microsoft Teams Integration
      • Integrating with Slack via Webhooks
      • Integrating with Microsoft Teams via Webhooks
    • Creating a Custom Completion Handler
    • Creating a Custom Middleman
    • Viewing Helix Validation Errors
  • About the Generated Documentation
    • Overview
    • Models
      • Template Model
      • Template Field Model
      • Template Folder Model
      • Parent-Child Relationships of Models
      • Inheritance Relationship Model
      • Dependency Relationship Model
    • Views
      • Template View
      • Template Field View
      • Template Folder View
      • Parent-Child Relationship View
      • Inheritance Relationship View
      • Dependency Relationship View
    • Diagrams
      • SitecoreUML Syntax
      • Templates Diagram
      • Template Folders Diagram
      • Layer Diagrams
      • Module Diagrams
      • Module Templates Diagrams
    • Samples
Powered by GitBook
On this page
  • Integrating SitecoreDXG into your Build Pipeline via the Command Line
  • Sample PowerShell Script to Call the Default RabbitMQ Middleman
  1. How To
  2. CI/CD Integration

Integrating SitecoreDXG into your CI/CD Pipeline

PreviousCI/CD IntegrationNextIntegrating the Default TeamCity RabbitMQ Meta-Runner

Last updated 6 years ago

SitecoreDXG was designed for easy of integration with any CI/CD pipeline. If you are looking to integrate SitecoreDXG into your TeamCity-based pipeline, see . Otherwise, if you are looking to integrate SitecoreDXG into Jenkins, Octopus Deploy, Travis, Codeship, GitLab, Buddy, Semaphore, or any other build tool then refer to the guide below.

Integrating SitecoreDXG into your Build Pipeline via the Command Line

You can integrate SitecoreDXG into your CI/CD pipeline by completing the following two steps:

  1. (excluding the TeamCity Meta-Runner definition XML file) on in a location that your build agent will have permissions to access

  2. Add a new step to your build that executes the PowerShell script, below (feel free to customize, rewrite or replace this script with your own written in the language of your choice)

Sample PowerShell Script to Call the Default RabbitMQ Middleman

## PARAMS #####################################

$scriptPath = "C:\path\to\rabbitmq-amqp-middleman.js"
$rabbitMQConnectionString = "http://localhost"
$serializerGetUrl = "http://uat-mysite.com/sitecoreuml/sitecoredxg/GetTemplateArchitecture"
$generationQueueName = "generation_queue__documentation"
$optionsJsonData = '{...}' # single-quotes intentionally used for proper parsing

## EXECUTION ##################################

Write-Output "Beginning execution..."

$scriptDir = (Get-Item $scriptPath).Directory.FullName
$currentLoc = Get-Location

Set-Location $scriptDir
npm install 
Set-Location $currentLoc

Write-Output "Dependencies installed"

$optionsFilePath = ".\$(New-Guid).json"
$optionsJsonData | Set-Content $optionsFilePath

Write-Output "Options JSON file generated at path $($optionsFilePath)"

Write-Output "Calling SitecoreDXG Middleman..."

node $scriptPath $rabbitMQConnectionString $serializerGetUrl $generationQueueName $optionsFilePath

Write-Output "Finished calling SitecoreDXG Middleman..."

Remove-Item $optionsFilePath

Write-Output "Cleaned up options JSON file"

Write-Output "Completed execution"
Integrating the Default TeamCity RabbitMQ Meta-Runner
Install the default RabbitMQ Middleman