archi-modelrepository-plugin
archi-modelrepository-plugin copied to clipboard
Add CLI options for commit and push
There are CLI options for cloning a repo and loading a model. I'd like to see options for commiting and pushing as well. Something like: --modelrepository.commit --modelrepository.push
The commit option should take an Commit-message argument
Combining this with jArchi scripting, this would make it possible to automatically update the model without using the GUI. See disussion here: https://forum.archimatetool.com/index.php?topic=733.msg4491#msg4491
Great idea. I wonder of the 'push' should be called 'publish' for consistency with the UI?
This would require a significant re-write of the code as it does a lot of UI stuff. For example, "Publish" does the following:
- Ask user to save model if needed (UI)
- Ask user to commit changes if needed (UI)
- Pull from remote
- If a merge is required present a dialog to user, deal with any merge conflicts (UI)
- Push to remote
It would be possible to throw some exceptions or not proceed in cases of (1) and (2) and (4) but all of the code would need to be re-written to do this, quite significantly.
Is it easier to create a CLI-option for simply exporting the model as a set of XML files? Something like: --modelrepository.export-to-XML The git operations themselves can then be performed from a batch/shell script.
A first stage might be to look at "commit". It still requires some refactoring of the code, though.
Hi! Let me bring this thread back to life. We are using the collaboration plugin too and found ACLI very useful for automating export tasks, but we are limited for import tasks which we are forced to run manually from the Archi application. We don't really need the git features as we use an environment with an already cloned repo and load the model using "--modelrepository.loadModel". A "--modelrepository.saveModel" would be extremely useful for running unattended import scripts.