How to bulid multi-repo for AEM Cloud Service, one repo for a site project, the other repo for another site project? | Community
Skip to main content
fulongt37334138
Level 2
April 17, 2023
Solved

How to bulid multi-repo for AEM Cloud Service, one repo for a site project, the other repo for another site project?

  • April 17, 2023
  • 2 replies
  • 3417 views

Hi Guys,

 

We want to bulid two Git repo to manage two site project code, but in the official document, we only found the method to build two site projects in one Git repo, anyone knows about this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jagadeesh_Prakash

@fulongt37334138  No from my knowledge. 

 

But a way where you can use separate environments for the repo's you can. But you can not have 2 repo's in 1 environment. 


@fulongt37334138  Once refer to the below URL's. You will get some idea 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/assets/deployment/multitenancy-concurrent-article-understand.html?lang=en

 

https://www.comwrap.com/en/blog/multi-tenancy-with-adobe-cloud-manager.html

 

2 replies

Jagadeesh_Prakash
Community Advisor
Community Advisor
April 17, 2023

@fulongt37334138 It is not recommended to have multiple repo in adobe cloud. Rather you can have one single repo and have multiple tenants in the single repo. We are currently using the same structure. Below will be the structure

 

Tenant 1

Tenant 2

Dispatcher

Parent pom.xml

fulongt37334138
Level 2
April 17, 2023

Thanks for your reply, but is it possible to use multi-repo?

Jagadeesh_Prakash
Community Advisor
Community Advisor
April 17, 2023

@fulongt37334138  No from my knowledge. 

 

But a way where you can use separate environments for the repo's you can. But you can not have 2 repo's in 1 environment. 

nitesh_kumar-1
Adobe Employee
Adobe Employee
April 17, 2023

Hi @fulongt37334138 ,

 

You can have multiple repositories in Cloud Manager Git.

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/managing-code/cloud-manager-repositories.html?lang=en 

 

The real trick here is the deployment, with every Cloud Manager build your other project code will get overwritten.

 

There are several ways to support multiple tenancies on AEM Cloud:-

 

1.) Make use of the Git submodule as multiple Repo. are supported, you can include one project in other through Gitsubmodule which would deploy both sites at runtime. https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/managing-code/cloud-manager-repositories.html?lang=en#git-submodule-support 

 

2.) Create a single maven project with both the site project as child modules.

 

For a detailed explanation, and to decide on the strategy I would recommend you check a blog post by one of our colleagues.

https://blog.developer.adobe.com/hosting-multiple-tenants-on-aem-815c8ed0c9f9 

 

Hope this helps!

 

Regards,

Nitesh