Skip to main content
Seeding your layered modules

Seeding your layered modules as part of a multi-org pipeline

Sravani Bhattiprolu avatar
Written by Sravani Bhattiprolu
Updated this week

Introduction

Layered modules are designed to allow teams to update and deploy the same metadata across multiple production orgs.

  • This allows a central team to deploy business wide updates without interrupting the development taking place in the individual orgs.

  • This is commonly used in cases where a business has a central team that maintains multiple region specific organizations.

Building a Pipeline with layered modules allows teams to layer their shared and org specific metadata together in an easy to understand UI.

Setting up a new repo

1) Create an empty repository in your chosen source control provider. Make sure to initialize it with a Read Me file as shown below. (I am using GitHub in this example)

2) Connect your source control to Gearset by navigating to My connections on the left-hand side menu and click on Source control and services.

(More detailed steps are provided here)

3) Navigate to the compare and deploy page and select the main branch of your newly created repo as the target. You should see an option to Set up repository as shown below:

4) Once you click Set up repository, it will take you through the setup wizard explained in this document. After reading each step, click Next.

πŸ“Œ At this stage, Gearset will automatically create your core module, but you will need to additionally create org specific modules for each region (e.g. a China module for a China org, an EU module for an EU org).

5) Create teams in GitHub with the module names. For example: Core-team, China-team, EU-team etc.

6) Finally, create a CODEOWNERS file in the repo as shown below. This file will prevent non team-members from editing a module that does not belong to them.

Seeding metadata into layered modules

Now that you have created your repository, it's time to fill it with metadata.

1) Run a comparison with your old repo as the source and the new repo as the target. Select the Core module.

2) Select the metadata that is shared between all the regions. We suggest starting with Standard objects (excluding their sub-components).

3) After deselecting the sub-components, commit the objects to the Core module.

4) Once your code module has a baseline, follow the same process for other layered modules as well.

πŸ’‘ Note: You don't have to commit all your metadata to setup a baseline, you can add more gradually once the Pipeline has been created.

Next Steps

Once you have created your modules, you will be able to set up a Pipeline to deploy to multiple production orgs.

Check out these articles next:

Did this answer your question?