Skip to content
New 1.0 Free Docker Image + 7 Industry Packages (.eap) included. Render.com Deploy Guide → ⚡ Try Live Demo ☕ Buy me a coffee

Schema-as-Code (SaC) & CI/CD Pipeline

Modern Enterprise Architecture embraces DevOps and Infrastructure-as-Code principles. Schema-as-Code (SaC) is EasyEA’s declarative specification that treats architecture diagrams as versionable source code reviewed via Pull Requests and validated automatically in CI/CD pipelines.


1. Schema-as-Code Specification (SaC Format)

Any schema can be exported and imported as a canonical JSON or YAML file:

{
"schema_version": "1.0",
"metadata": {
"name": "E-Commerce Core Checkout Flow",
"description": "Logical cart and checkout flow with payment gateway",
"layer": "Application",
"version": "2.4.0",
"status": "Approved"
},
"elements": [
{
"id": "elem-checkout-service",
"type": "ApplicationService",
"name": "Checkout Orchestrator Service",
"layer": "Application",
"properties": {
"technical_fitness": 4,
"business_fit": 5,
"tco_annual": 45000,
"sla": "99.95%"
},
"visual": {
"x": 280,
"y": 140,
"width": 160,
"height": 70,
"fill_color": "#dbeafe"
}
},
{
"id": "elem-payment-gateway",
"type": "ApplicationComponent",
"name": "Stripe Payment Gateway",
"layer": "Application",
"properties": {
"hosting": "SaaS",
"criticality": "Mission Critical"
},
"visual": {
"x": 540,
"y": 140,
"width": 160,
"height": 70,
"fill_color": "#ede9fe"
}
}
],
"relationships": [
{
"id": "rel-checkout-to-payment",
"type": "Serving",
"source_id": "elem-payment-gateway",
"target_id": "elem-checkout-service",
"properties": {
"protocol": "HTTPS/REST",
"circuit_breaker": true
}
}
]
}

2. CI/CD Automation with GitHub Actions & GitLab CI

Store .sac.json files alongside application repositories. Architecture changes are formally validated before merging into main:

.github/workflows/validate-architecture.yml
name: Validate Architecture Schemas (SaC)
on:
pull_request:
paths:
- 'architecture/**/*.sac.json'
jobs:
validate-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate ArchiMate Metamodel Rules
run: |
curl -X POST https://easyea.corp.lan/api/v1/schemas/validate-sac \
-H "Authorization: Bearer ${{ secrets.EASYEA_API_KEY }}" \
-F "file=@architecture/checkout-flow.sac.json"
  • Metamodel Enforcement: Guarantees connectors comply with ArchiMate 3.x rules.
  • Mandatory Quality Gates: Enforces completeness (e.g., verifying every component defines a business owner and annual TCO).
  • PR Visual Feedback: EasyEA automatically posts a diff summary comment directly onto the Pull Request.

3. Dedicated jArchi Modeling Scripts

  • EasyEA_ExportToSaC.ajs: Select any diagram in Archi Desktop and export it directly to .sac.json ready for git commit.
  • EasyEA_ImportFromSaC.ajs: Load a remote or local SaC definition into Archi Desktop with automatic element placement and relationship restoration.