Jx: add a CLI command to split a monorepo up into separate git repos

Created on 16 May 2018  路  3Comments  路  Source: jenkins-x/jx

sometimes folks develop a set of related microservices in a monorepo. The main issue then is its hard to get real CI/CD on each microservice - its basically a monolith.

e.g. these excellent examples:
https://github.com/jenkins-x/spring-petclinic-gcp#generatingupdating-the-separate-microservices

so lets have a little CLI command that can mirror the source code from a monorepo into N microservice git repos so that after each merge to master on the monorepo the CI/CD pipeline can run

jx step split monorepo -o myorg --glob "foo-*"

and mirror the code into N separate repos which if there's a code change will then trigger a CI/CD pipeline on each microservice only

Most helpful comment

"The main issue then is its hard to get real CI/CD on each microservice - its basically a monolith."

Complete nonsense, I am working with monorepos for a long time and building sophisticated pipelines for each subfolder/service and it works just fine, the fact that Jenkins X does not support monorepos is huge blocker for me and other folks with monorepos.

All 3 comments

here's an example of the generated repos https://github.com/petclinic-gcp

Adding a comment to this, as in https://github.com/jenkins-x/jx/issues/5042 there is a request for monorepo support, which wouldn't really be addressed by this. One of the main benefits of haivng a monorepo is the abiliity to centralise issues and PRs, so ideally it would be possible to still have the split step performed within the repo itself, and what would be even better is if it could be possible to have a jenkins-x file for each of the sub-modules.

"The main issue then is its hard to get real CI/CD on each microservice - its basically a monolith."

Complete nonsense, I am working with monorepos for a long time and building sophisticated pipelines for each subfolder/service and it works just fine, the fact that Jenkins X does not support monorepos is huge blocker for me and other folks with monorepos.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sourabhg picture sourabhg  路  4Comments

rudolph9 picture rudolph9  路  3Comments

empath picture empath  路  3Comments

ysaakpr picture ysaakpr  路  5Comments

shahnewazrifat picture shahnewazrifat  路  3Comments