Archi Forum

Archi => General Archi Discussion => Topic started by: Prasun on April 22, 2019, 17:03:54 PM

Title: Archi HTML report automation on-update of model ( CI?)
Post by: Prasun on April 22, 2019, 17:03:54 PM
Dear Archi experts,

I wanted to explore the area where on change of a model the generation of the HTML report can be automated. Ideally the model stays on database( cloud, using database plugin) or git (gitlab using collaboration plugin). It would possibly need an interface to generate HTML report from the database or from git without archi IDE- ( and can possibly later automated as CI pipeline) .The HTML report can be hosted as a static web page.( on cloud)

Did anybody already used archi in this area?

Thanks in advance ,
Prasun
Title: Re: Archi HTML report automation on-update of model ( CI?)
Post by: Hervé on April 22, 2019, 19:43:14 PM
Hi Prasun,

You've got two choices here:
1- if you use the database plugin, you may install the script plugin which is able to import a model from a database and export an HTML report (more information on https://github.com/archi-contribs/script-plugin (https://github.com/archi-contribs/script-plugin)). I personally do it this way on a weekly basis on a Linux server.
2- if you use the Git plugin, you can import a model from GitHub and export an HTML report using the Archi command line (more information on https://github.com/archimatetool/archi/wiki/Archi-Command-Line-Interface (https://github.com/archimatetool/archi/wiki/Archi-Command-Line-Interface)).

Hope this helps

Best regards
Hervé
Title: Re: Archi HTML report automation on-update of model ( CI?)
Post by: Phil Beauvoir on April 23, 2019, 09:33:03 AM
I have actually done this using a git hook.

1. Add a hook into git so that when a commit occurs a script is run. (Can't remember how I did that, sorry)
2. The script runs the CLI on a copy of Archi on the server to check out the model and generate the report.

Something like:



./Archi -application com.archimatetool.commandline.app -consoleLog -nosplash
--modelrepository.loadModel <path>
--modelrepository.cloneModel <url>
--html.createReport <path>

Title: Re: Archi HTML report automation on-update of model ( CI?)
Post by: Hervé on April 23, 2019, 09:54:17 AM
That's a very good idea, thanks for sharing it  ;)