Using ArchiMate CI Docker Image in Automated Pipelines
The Challenge
Running Archi CLI in CI/CD pipelines requires installing Archi, managing dependencies, and configuring headless execution. This setup complexity can slow adoption and create maintenance overhead across multiple pipeline configurations.
ArchiMate CI Docker Image
The archimate-ci-image project provides a pre-configured Docker container with Archi CLI, coArchi plugin for Git collaboration, and an entrypoint script that simplifies pipeline integration.
Command Line Interface
Archi provides a powerful CLI for headless automation, enabling integration into CI/CD pipelines and scheduled workflows. See Archi CLI documentation
Key CLI capabilities:
- Load and create models programmatically
- Export to multiple formats without GUI
- Run jArchi scripts for transformations
- Generate reports automatically
- Clone and sync collaboration repositories
Learn more: ArchiMate CI Image on GitLab
Container Features
Pre-installed Archi - Ready-to-use Archi CLI without manual installation
coArchi Plugin - Built-in support for Git-based model collaboration
Entrypoint Script - Environment variable-driven configuration
Multi-Registry - Available on GitHub Container Registry, Quay.io, and Docker Hub
Report Generation - HTML, Jasper (PDF/DOCX), and CSV exports
Model Export - ArchiMate Exchange Format output
Quick Start
Local Testing
Test the container locally before integrating into pipelines:
mkdir -p ./report
chmod o+rw ./report
docker run --rm -ti \
-v $(pwd)/report:/archi/report \
-e GIT_REPOSITORY=https://github.com/your-org/architecture-models.git \
-e ARCHI_HTML_REPORT_ENABLED=true \
-e ARCHI_CSV_REPORT_ENABLED=true \
-e ARCHI_EXPORT_MODEL_ENABLED=true \
ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
This clones your model repository, generates HTML and CSV reports, and exports the model in ArchiMate Exchange Format.
Local Repository
Process an existing local repository:
cd /path/to/architecture-models
mkdir -p ./report
docker run --rm -ti \
-v $(pwd):/archi/project \
-v $(pwd)/report:/archi/report \
ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
GitLab CI Integration
Basic Pipeline
Add to .gitlab-ci.yml:
stages:
- export
archi-export:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
variables:
ARCHI_HTML_REPORT_ENABLED: "true"
ARCHI_CSV_REPORT_ENABLED: "true"
ARCHI_EXPORT_MODEL_ENABLED: "true"
script:
- echo "Reports generated"
artifacts:
paths:
- report/
expire_in: 30 days
Knowledge Graph Integration
Extend the pipeline to update knowledge graphs:
stages:
- export
- transform
- publish
archi-export:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
variables:
ARCHI_EXPORT_MODEL_ENABLED: "true"
ARCHI_HTML_REPORT_ENABLED: "true"
artifacts:
paths:
- report/
expire_in: 1 day
transform-to-rdf:
stage: transform
image: python:3.11
before_script:
- pip install rdflib lxml
script:
- python scripts/archimate-to-rdf.py
--input report/*.archimate
--output report/model.ttl
--namespace https://linked.archi/id/
artifacts:
paths:
- report/model.ttl
expire_in: 1 day
publish-to-kg:
stage: publish
image: curlimages/curl:latest
script:
- |
curl -X POST $TRIPLESTORE_URL/repositories/architecture/statements \
-H "Authorization: Bearer $TRIPLESTORE_TOKEN" \
-H "Content-Type: text/turtle" \
--data-binary @report/model.ttl
only:
- main
How It Works
Extract - Pull data from source tools (Archi models, Git repos, Jira, Confluence)
Transform - Convert tool-specific formats to RDF triples conforming to the metamodel
Align - Map tool-specific concepts to common ontology (e.g., Jira "Epic" → Capability)
Query - Use SPARQL to answer questions spanning multiple sources
Scheduled Updates
Run nightly exports to keep knowledge graphs current:
archi-scheduled-export:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
variables:
ARCHI_EXPORT_MODEL_ENABLED: "true"
script:
- echo "Scheduled export complete"
artifacts:
paths:
- report/
only:
- schedules
Configure in GitLab: CI/CD → Schedules → New schedule (e.g., 0 2 * * * for 2 AM daily)
GitHub Actions Integration
Basic Workflow
Add to .github/workflows/archi-export.yml:
name: Export ArchiMate Models
on:
push:
branches: [main]
paths:
- 'models/**'
workflow_dispatch:
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Export Archi Models
uses: docker://ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
env:
ARCHI_HTML_REPORT_ENABLED: true
ARCHI_CSV_REPORT_ENABLED: true
ARCHI_EXPORT_MODEL_ENABLED: true
- name: Upload Reports
uses: actions/upload-artifact@v3
with:
name: archi-reports
path: report/
retention-days: 30
Deploy to GitHub Pages
Automatically publish HTML reports to GitHub Pages:
name: Export and Publish
on:
push:
branches: [main]
jobs:
export-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- uses: actions/checkout@v3
- name: Export Models
uses: docker://ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
env:
ARCHI_HTML_REPORT_ENABLED: true
ARCHI_EXPORT_MODEL_ENABLED: true
GITHUB_TOKEN: $
GITHUB_PAGES_BRANCH: gh-pages
- name: Deploy to Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: $
publish_dir: ./report/html
Multi-Model Repository
Process multiple models in one repository:
jobs:
export-all:
runs-on: ubuntu-latest
strategy:
matrix:
model: [business-arch, application-arch, technology-arch]
steps:
- uses: actions/checkout@v3
- name: Export $
uses: docker://ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
env:
ARCHI_PROJECT_PATH: /github/workspace/models/$
ARCHI_REPORT_PATH: /github/workspace/report/$
ARCHI_EXPORT_MODEL_ENABLED: true
- name: Upload $ Reports
uses: actions/upload-artifact@v3
with:
name: $-reports
path: report/$/
Configuration Options
Report Generation
HTML Reports - Interactive web-based model views
ARCHI_HTML_REPORT_ENABLED=true
ARCHI_HTML_REPORT_PATH=/archi/report/html
Jasper Reports - Professional PDF/DOCX documentation
ARCHI_JASPER_REPORT_ENABLED=true
ARCHI_JASPER_REPORT_FORMATS=PDF,DOCX
ARCHI_JASPER_REPORT_TITLE="Enterprise Architecture"
CSV Exports - Tabular data for analysis
ARCHI_CSV_REPORT_ENABLED=true
ARCHI_CSV_REPORT_PATH=/archi/report/csv
Git Authentication
Token-based (recommended):
GIT_REPOSITORY=https://github.com/org/models.git
GIT_TOKEN=$
SSH Key:
GIT_REPOSITORY=git@github.com:org/models.git
# Mount SSH key as volume: -v ~/.ssh:/root/.ssh:ro
Advanced Patterns
Conditional Exports
Only export when models change:
archi-export:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
rules:
- changes:
- models/**/*.archimate
script:
- echo "Model changed, exporting..."
Parallel Processing
Export multiple formats simultaneously:
archi-export:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
parallel:
matrix:
- FORMAT: [html, csv, jasper]
variables:
ARCHI_HTML_REPORT_ENABLED: $([[ "$FORMAT" == "html" ]] && echo "true" || echo "false")
ARCHI_CSV_REPORT_ENABLED: $([[ "$FORMAT" == "csv" ]] && echo "true" || echo "false")
ARCHI_JASPER_REPORT_ENABLED: $([[ "$FORMAT" == "jasper" ]] && echo "true" || echo "false")
Notification on Completion
Send notifications when exports complete:
notify:
stage: .post
image: curlimages/curl:latest
script:
- |
curl -X POST $SLACK_WEBHOOK \
-H 'Content-Type: application/json' \
-d "{\"text\":\"Architecture models exported: $CI_PIPELINE_URL\"}"
when: on_success
Integration with Linked.Archi
Complete pipeline for knowledge graph updates:
stages:
- export
- transform
- validate
- publish
export-models:
stage: export
image: ghcr.io/woozymasta/archimate-ci:4.9.2-1.0.3
variables:
ARCHI_EXPORT_MODEL_ENABLED: "true"
artifacts:
paths: [report/]
transform-to-rdf:
stage: transform
image: python:3.11
script:
- pip install rdflib lxml
- python scripts/archimate-to-rdf.py report/*.archimate report/model.ttl
artifacts:
paths: [report/model.ttl]
validate-metamodel:
stage: validate
image: python:3.11
script:
- pip install pyshacl
- pyshacl -s https://meta.linked.archi/shapes.ttl -d report/model.ttl
publish-knowledge-graph:
stage: publish
image: curlimages/curl:latest
script:
- curl -X POST $KG_ENDPOINT/statements
-H "Authorization: Bearer $KG_TOKEN"
-H "Content-Type: text/turtle"
--data-binary @report/model.ttl
only: [main]
Benefits
Zero Setup - No Archi installation or dependency management
Consistent Environment - Same container across all pipelines
Version Control - Pin specific Archi versions via image tags
Parallel Execution - Run multiple exports simultaneously
Cloud Native - Works in any container-based CI/CD platform
Reproducible - Identical results across environments
Troubleshooting
Permission Issues: Ensure report directories have write permissions
chmod o+rw ./report
Memory Limits: Large models may need increased container memory
variables:
DOCKER_MEMORY: 4g
Git Authentication: Use tokens instead of passwords for private repos
GIT_TOKEN=$
Next Steps
- Archi CLI Automation - Detailed CLI patterns
- Integrating Archi Tool - Knowledge graph integration
- Semantic Integration - Cross-tool linking concepts
The ArchiMate CI Docker image eliminates pipeline setup complexity, enabling teams to focus on architecture rather than tooling infrastructure.
Linked.Archi Publications