Can you have files at group/sub-group level?

I’m new to Gitlab and soon my projects will be migrated onto GitLab Cloud under a sub-group. We have a number of repos that are related but independent pieces. We also have some files that go across all the repos, such as overall system documentation and end-to-end tests.

In terms of setting this up in GitLab, how would we do this?

  1. Does GL support files at the sub-group level, so could we have some files in our group and then repos underneath?
  2. Alternatively does GL support nested repos, so have a system repo with component repos under it?
  3. Or would we need to set up a separate repo with “common” files and have implied dependencies between the repos?

Thanks.

Hi Rob,

As far as I know, you cannot have files outside a “Project” - and every “Project” is a git repository.

We have quite similar situation in our company. So, to answer your questions:

  1. No.
  2. Not really like that, but you could use concept of git submodules
  3. Basically, you have to do it like that I think.

→ So if you have files (folder with files) that should be shared and changed equally over time, you can do either with git submodules or perhaps with internal dependency system (if it’s like a software system with many modules in the same programming language).

→ If you have files that should just be a common starting point, then you can use Project Templates

From my experience - we also have system tests, they are in completely separate repo. But we don’t use submodules or anything. We just trigger pipelines from one project to another. The same we do for Master Documentation sites - we write docs in every little project separately and then use another “Master Docs” projects to have a pipeline where we merge them and deploy. So, maybe this is an idea for you as well, depends on your use case.

Hope this helps!