Monorepos

A Monorepo is a popular software development strategy to maintain multiple microservices in one source code repositories. For integrations like GitHub Repository, monorepos are not visible, as they only have access to the metadata, provided in this case from GitHub, which is why a custom integration is required.

How to represent in VSM

LeanIX VSM supports hierarchies, i.e. parent-child relations, which can become handy for navigation & search. Monorepos are represented best in a hierarchy, e.g.

|_ Software Artifact 1 (Repo name)
   |_ Software Artifact 1.1 (Mono repo#1)
   |_ Software Artifact 1.2 (Mono repo#2)
   |_ Software Artifact 1.3 (Mono repo#3)

Import the actual repository

The repository itself can be imported via the GitHub Repository integration

Import the monorepos

An easy way to augment the monorepo information is via CI/CD integration. In the metadata file, add custom attributes, e.g.

id: cicd-connector-v2
name: cicd-connector-v2
description: CI/CD revamped
self: https://github.com/leanix/cicd-connector-v2/blob/main/lx-manifest.yml
owner: [email protected]
teams:
  - cider
products:
  - leanix-mi
links:
  - name: vcs
    url: https://github.com/leanix/cicd-connector-v2 
monorepos:
  - repo1
  - repo2
  - repo2

Now, you can add a custom integration API configuration on top of the predefined configuration, which creates a software artifact fact sheet for the monorepo, as well as the corresponding relToParent relation to the actual repo.


Did this page help you?