0

I have a project A and I have added a submodule to another project B.

I see that the submodule used in A is referring to a particular commit, and I would like this to be updated every time a new commit appears in B.

Is it possible to trigger an automatic pull/push of the submodule in A when B is updated?
Or this procedure has to be done always by hand?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
nemi
  • 11
  • 2

1 Answers1

1

You might consider:

You can set up GitLab CI/CD across multiple projects, so that a pipeline in one project can trigger a pipeline in another project. You can visualize the entire pipeline in one place, including all cross-project inter-dependencies.

Your first pipeline would be triggered only on pushes.
And it includes a trigger to your project A, which would then execute a git submodule update --remote, in order to update the submodule B.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250