-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example of working with Git submodules
- Loading branch information
1 parent
e929099
commit 06e3f10
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Working with GIT submodules | ||
This example discusses how one could build the relational tree structure representing submodules within GIT using Eiffel events. | ||
|
||
## Introduction | ||
A common use case in GIT is where one want to connect a relationship between repositories to be able to mirror the GIT structure as it is. The scenario could be that you have a parent repository who have one or many GIT submodule. | ||
|
||
Below is a simple image of how it could look in GIT. | ||
|
||
![alt text](./submodule-git.png) | ||
|
||
## Eiffel solution | ||
This will show you one setup for the Eiffel model on how to get around the use-case where there is a sceanrio where GIT submodules are used. | ||
|
||
![alt text](./submodules-eiffel.png) | ||
|
||
Depending on the solution setup, a Service can be created to listen for SCCs (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined (CD) event and publishes it on the bus. | ||
|
||
Important drawback from this is that it does not create a linear relationship downwards. Even though one could argue that it does, but it requires knowledge about what SCC one is suposed to query. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.