Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage multiple maven projects in gitlab

We have multiple (about 75) maven projects, which we have pushed to Gitlab individually in following manner:
GROUP1 - 4 projects
GROUP2 - 2 projects
GROUP3 - 10 Projects
.
.
GROUP10 - 6 Projects


We now want to implement CI tool like Jenkins. But creating and managing all 75 projects in jenkins individuality is very time consuming. So that we have 2 methods in mind.

  1. git submodules: In this case we might get many complications, as individual developer is forking the multiple project and works in his forked repo.
  2. Single git Project: In this case if every developer will fork the main repo, then disk space required is much and the performance will also get degrade. But it will be better than git submodules to manage, as build can be simplified with maven multiple module way.

So according to you, is there any other approach we can think about, or can we go with Single git project?

like image 264
TPS Avatar asked Jul 19 '18 06:07

TPS


People also ask

Can a GitLab project have multiple repositories?

One Solution: Gitlab supports the creation of groups of projects/repos, which can be managed as a project consisting of multiple repos.

Does GitLab have a Maven repository?

premium. silver. Introduced in GitLab Premium 11.3. With the GitLab Maven Repository, every project can have its own space to store its Maven artifacts.


1 Answers

I also manage over 50 Gitlab Maven Projects and use Gitlab CI to build each project and deploy the artifact to our central artifact repository. Gitlab CI does not support re-building consumers of Maven artifacts when a downstream artifact changes. They have a concept of "Triggering" but this simply does not work well when you have so many projects.

I usually push changes in one at a time and wait for the previous commit to fully build and publish to the central repository before pushing in the next commit.

This was very time consuming so as an alternative we did build an internal tool to solve this. I made the tool public a few days ago and it's in the Alpha stage, but you are free to try it if you'd like.

It's called Gitlab Pipes. The documentation has a quick start to get you started quickly.

like image 188
Alex Avatar answered Oct 18 '22 21:10

Alex