Search code examples
sap-commerce-cloudspartacus-storefront

Does SAP CCV2 force a single repo for Spartacus applications?


CCV2, the deployment system for SAP Commerce seems to impose a very restrictive constraint (I daresay an anti-pattern) for Spartacus projects.

CCVS Repository Selection

One would imagine since Spartacus is a "headless" application as opposed to a "monolithic" application, where files from the server & client side communicate over an API rather than directly referencing one another we'd place each application in its own repository.

Is there some way we can achieve that with CCV2, for example could we mark the js-storefront folder as a git submodule and have Spartacus in a separate repo? Would CCV2 support such a thing? Is there another way to achieve it? I'd really like to avoid the tight coupling.


Solution

  • Digging through the docs today, I found that submodules are supported!

    All customizations are stored in a single repository by default. It can contain core customization (extensions, configuration), Data Hub customization, and Javascript storefront.

    You can use git submodules functionality to split the content into multiple repositories. In such a setup, the main repository points to particular commits in separate repositories. Credentials configured in the Cloud Portal for the main repository are then also reused for submodules.

    Additional documentation with a diagram indicating breakout of storefront

    Spartacus Submodule