SysML - GitHub Capabilities

GitHub is a Git-based software configuration management system (also called application lifecycle manager or ALM). The Syndeia interface allows the user to create a Reference connection between a MagicDraw element and Github branch, commit, tag or file. A comparison across the connection shows whether a later version of the GitHub element is available. As in previous tutorials, we assume the reader has a working knowledge of the non-SysML tool, i.e. GitHub.

Creating a SysML – GitHub Reference Connection

  1. Open the GitHub tutorial model provided in MagicDraw. Open the Syndeia dashboard by right-clicking the Git Tutorial package and selecting Syndeia → Dashboard. In the Repository Manager tab, create a connection to a GitHub repository (if one does not already exist) by right-clicking on GitHub in the list of repositories on the left and selecting Add… Enter the URL, user name, and password to access your GitHub repository, along with a short Repository Name you wish to identify it with, and click OK.
     
  2. Switch to the Connection Manager tab, click on Repositories at the top of the third column and select your GitHub repository. It should open to show you the repositories for which you have access. Expand these to show the projects, branches, commits, folders and files. The final result should look something like the figure above.
     
  3. Create a Reference connection between the SysML element Git Test Block and a commit in the Master branch of a project by selecting Reference Connection in the center panel and dragging Git Test Block onto the desired GitHub Commit (or vice versa). You can check the connection created in the Connection Browser or Connection Summaries tab (be sure to refresh these to see the latest).

     
     
  4. In MagicDraw, right-click Git Test Block in the containment browser and select Syndeai → Open Connected Artifacts. This should open GitHub in your default web browser to the commit it has been connected to, as in the figure above. 

  5. On the Syndeia dashboard, Connection Browser, right-click the connection from Git Test Block and select Compare SysML & Target. The Comparison Result tab should show something like this.



    The result is red, showing a difference. Git Test Block is connected to an early commit on the Master branch (starting f902…), but there is a latest version on the same branch (starting df83…). The Compare SysML & Target in the case of a Reference connection does not look at the contents of the two models, only whether there is a later version of the same target element in a configuration-managed repository.
     
  6. To change the Reference connection from Git Test Block to the latest commit on the same branch, go to the Syndeia dashboard, Connection Browser, right-click the connection from Git Test Block and select Sync SysML → Target. Now use Compare SysML & Target to check that the SysML block is connected to the latest commit on this branch.


     
  7. The same functionality is available for creating reference connections from SysML elements to files managed GitHub. We will drag Git Test Block to the README file under the Initial commit in the Master branch under Dirk-Sandbox.


     
  8. As with commits, we can use the compare and sync functions to identify the latest version of the same file and to update the connection from the SysML element to the latest version.

Copyright 2018 Intercax.