This Docker image provides a mechanism to generate HTML reports from an Archi model (using coArchi).
Archi is a visual modelling tool for enterprise architecture, using ArchiMate notation.
In order to build an HTML report, first you need to set up a repository with a coArchi-based model. This docker image does not provide the visual part of Archi, only a way to build a report, so you should install Archi locally to edit the model.
- Download Archi
- Download coArchi Plug-in
- Open Archi
- From the
Help
menu, selectManage Plug-ins
- From the Plug-Ins dialog, select
Install New...
and locate the plugin file you downloaded - Let Archi restart itself. The plugin should now be installed
- Configure the coArchi plug-in to with with this repository
- From the
Collaboration
menu, selectImport Remote Model to Workspace
- Follow the instructions, using your usual method for accessing GitHub repositories (SSH/HTTPS) along with the relevant credentials.
- If you use SSH, you may need to change the 'Identity file' path in Archi's preferences (if your key isn't stored in
~/.ssh/id_rsa
)
- If you use SSH, you may need to change the 'Identity file' path in Archi's preferences (if your key isn't stored in
- From the
- Once the repository is in your workspace the
Collaboration
menu/sidebar can be used commit and push your changes to the repository.
⚠️ Caution: Archi can use branches, but they are not intended to work for merging changes (eg. Pull Requests).
docker run --rm -i -v "$(pwd)":/tmp/model -v "$(pwd)/html":/tmp/html ghcr.io/dsample/archi-docker:main
Explanation of the command line arguments above:
--rm
: Remove the container after it exits-i
: Waits for the container to exit before continuing-v "$(pwd)":/tmp/model
: Mounts the current working directory (where the coArchi model is located) within the container-v "$(pwd)/html":/tmp/html
: Mounts thehtml
directory within the current working directory into the container for the output to be saved in
Using GitHub Actions an HTML report can be generated for the model upon each commit. Placing the resulting report into the docs
directory also enables the use of GitHub Pages (which is available for private repositories).
name: HTML Report
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- model
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Build the report
run: >-
docker run --rm -i
-v "$(pwd)":/tmp/model
-v "$(pwd)/docs":/tmp/html
ghcr.io/dsample/archi-docker:main
- name: Commit the report
run: |
git config --global user.name "Archi"
git add docs
git diff-index --quiet HEAD || git commit -m 'Update report'
git push