Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


title: "Lesson 3: CI/CD Pipeline (Validation)" weight: 3 summary: "Automating architectural checks in your pipeline."

Lesson 3: CI/CD Pipeline

Architecture compliance shouldn't be a manual review process. It should be a build step.

The Pipeline

In your GitHub Actions or Jenkins pipeline, add a step to install and run Sruja.

steps:
  - name: Checkout
    uses: actions/checkout@v3

  - name: Install Sruja
    run: cargo install sruja-cli --git https://github.com/sruja-ai/sruja --locked

  - name: Validate Architecture
    run: sruja validate architecture/

Breaking the Build

If a developer introduces a violation (e.g., "Frontend talks directly to Database"), sruja validate will exit with a non-zero code, failing the build.

This is Governance as Code. You stop architectural drift before it merges.