Note: this is a pilot feature. If you would like to join the pilot please get in touch.
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 organisations.
Building a Pipeline with layered modules allows teams to layer their shared and org specific metadata together in an easy to understand UI.
In this example we have a core module, a European module, and a North American module.
Creating your Pipeline
You will need to create a new Team-shared Pipeline to use with your layered modules. Make sure that you select the main branch as your default base branch for new feature branches.
Once you save the job, you will be prompted to setup the webhook for the pipeline. It is recommended to click the Add webhook
button and Gearset will automatically create the webhook for you. If you wish to create it manually, the dropdown will give you the instructions on how to setup the webhook manually.
Creating your environments
Once you setup the pipeline, you would need to create static environments for all the modules (For example: EU and NA).
Click Create environment
and you will then be able to create a new environment from scratch. To do so, select Create new environment/job
as shown below.
Clicking this button will take you to our Continuous Integration (CI) job wizard, where you will be able to easily create CI jobs.
Find out more about how to set up your first CI job in Gearset - this article will lead you through the set up and job configuration settings. It is recommended to use the same settings across all the CI jobs.
Note: you should use the same branches across corresponding environments.
For example:
The static environments for Europe UAT
The source is the UAT branch
The target is the EU UAT org
The layered module is EU
The static environments for Europe Production and North America
The source is the UAT branch
The target is the NA UAT org
The layered module is NA
Select the relevant Source branch and Layered module for each job as shown below.
Once you create your static environments, they should look like this. (In this example, I created CI jobs for my EU UAT
, EU Production
, NA UAT
and NA Production
orgs).
Adding Developer Sandboxes
Once you created your static environments, you would need to create your dev sandboxes.
Click Add
dropdown and select Add developer sandbox
.
Enter the org details and Save
.
Follow the same steps to create more Developer Sandboxes if needed.
Connecting your Environments
Once you have created all your environments, you can connect them by clicking on Edit Environments
button.
Connect your environments so that each layered module forms its own separate pipeline and click Save changes
.
The end result should look something like this:
Once this is completed, check out our next article for information on promoting a change through your new Pipeline.