Archi Forum

Archi Plug-ins => coArchi => Topic started by: gcasier on August 11, 2020, 12:41:21 PM

Title: Automated exports from Collaboration model
Post by: gcasier on August 11, 2020, 12:41:21 PM
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.
Title: Re: Automated exports from Collaboration model
Post by: Phil Beauvoir on August 11, 2020, 12:53:02 PM
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"
Title: Re: Automated exports from Collaboration model
Post by: gcasier on August 12, 2020, 10:52:06 AM
Thank you Phil, I wasn't aware I needed all of the statements above to clone the model.
Works like a charm now!
Title: Re: Automated exports from Collaboration model
Post by: Phil Beauvoir on August 12, 2020, 10:54:55 AM
I don't think you need --modelrepository.userName if using an SSH identify file.