Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Migrate from submodules to explicit repositories #46

Open
jacintoArias opened this issue Aug 14, 2018 · 0 comments
Open

Migrate from submodules to explicit repositories #46

jacintoArias opened this issue Aug 14, 2018 · 0 comments

Comments

@jacintoArias
Copy link
Member

Submodules pose some operative problems, I propose switching to explicitly declared repositories.

Currently submodules allow us to perform:

  • Checkout existing code into monorepo (in case of gitlab without deployment keys)
  • Track independent branches per monorepo branch.

How to implement it:

demorepo.yml will track repo url, as in any dependency manager.

projects:
    project1:
        path: 'https://github.com/user/project1'
    project2:
        path: 'https://github.com/user/project2'

With this approach demorepo will need to git clone the projects on each job, ssh access (via deployment keys) must be granted to the machine.

In order to track individual branches we could use a default/per project mapping. Notice that if just allow a direct 1/1 (by default) mapping this feature is directly implemented.

demorepo:
   branches:
     # Here you could map a demorepo branch to each project branch, by default it could just be
      develop: develop
      staging: staging
      master: master

projects:
    project1:
        path: 'https://github.com/user/project1'
        branches:
           develop: develop
           staging: staging
           master: master

I propose that this functionaly may be implemented in multiple commands.

  • demorepo fetch: will clone/pull the repositories from the origins
  • demorepo run/stage must be git aware of the current repo branch. It could also fetch the projects by default.

Questions:

Is there a way to retrieve the content of the repository without really cloning a project?? I would be annoying to manually ignore tracking of the fetched code and its subrepos.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant