Automated exports from Collaboration model

Started by gcasier, August 11, 2020, 12:41:21 PM

Previous topic - Next topic

gcasier

Using the Archi Command Line Interface (CLI), I've been trying to automatically get the shared model (in this case on GitLab) and export this to a html version on a daily/weekly basis. I've succeeded in exporting a local model, but accessing the shared model seems a bit more trickier. Are there any examples I can use to achieve this?

As described here: https://github.com/archimatetool/archi-modelrepository-plugin/issues/81, I can assume it should be possible using SSH authentication, but I can't seem to get the command exactly right. The command line interface doesn't provide me with any feedback, which makes it quite hard to know if I'm getting closer.

Phil Beauvoir

#1
These are the CLI commands that are possible:


   --modelrepository.cloneModel <url>                      Clone a collaboration model from <url> to the <path> set in option
                                                           --modelrepository.loadModel (optional).
   --modelrepository.identityFile <identity file>          Path to SSH identity file (if option modelrepository.cloneModel is used with SSH
                                                           protocol))
   --modelrepository.loadModel <path>                      Load a collaboration model from the given repository folder at <path> (required
                                                           if option --modelrepository.cloneModel is used).
   --modelrepository.passFile <password file>              Path to a file containing the HTTP login password or the password to the SSH
                                                           identity file (required if option --modelrepository.cloneModel is used).
   --modelrepository.userName <userName>                   Online repository login user name (required if option
                                                           --modelrepository.cloneModel is used with HTTP protocol).


So, to clone from a remote to a local folder you want CLI arguments like this:


--modelrepository.cloneModel "git@github.com:FredBloggs/testModel.git"
--modelrepository.loadModel "C:\\MyFolder"
--modelrepository.userName "FredBloggs"
--modelrepository.passFile "C:\\Users\\FredBloggs\\pw.txt"
--modelrepository.identityFile "C:\\Users\\FredBloggs\\.ssh\id_rsa"
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

gcasier

Thank you Phil, I wasn't aware I needed all of the statements above to clone the model.
Works like a charm now!

Phil Beauvoir

I don't think you need --modelrepository.userName if using an SSH identify file.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.