Technical Guide for Overriding Inheritance Settings
Note: The feature described in this document is meant as a temporary/assisting solution for customers migrating from GitHub Enterprise Server (GHES) to GitHub Enterprise Cloud (GHEC).
Mend.io does not recommend keeping this environment variable in permanent use. The recommended approach is to use this feature temporarily during migration, and later to replace the actual values in the settingsInheritedFrom field in the various .whitesource files in the repos.
Overview
This guide provides a detailed explanation of the feature designed to assist in the migration from GitHub Enterprise Server (GHES) to GitHub Enterprise Cloud (GHEC).
A migration from GHES to GHEC might lead to issues with the settingsInheritedFrom field due to changes in organizational structures; this guide will help you avoid these issues for a smooth migration experience.
Background
When migrating from GHES to GHEC, customers often consolidate multiple global-level organizations into a single organization. This consolidation can break the settingsInheritedFrom field, which points to "whitesource-config/whitesource-config" (or other), as it may reference an obsolete organization. To address this, a new environment variable is introduced that allows users to override all settingsInheritedFrom configured values in .whitesource files. Enabling the environment variable will override the values in all settingsInheritedFrom fields.
Note that the values in the .whitesource files aren’t altered or replaced, only overridden.
Getting it done
Migration Steps
Enable the environment variable
Add an environment variable to the controller:
Environment variable name:
MEND_OVERRIDE_SETTINGS_INHERITANCEType: string
Default value: null (feature is disabled by default)
Provide the path to your global configuration repository, for example “mend-config/mend-config“.
Override Settings
When the environment variable is enabled, the
settingsInheritedFromvalue of all .whitesource files will be overridden by the value set in the environment variable. If no branch is specified in the environment variable, the branch specified in thesettingsInheritedFromfield will be used.
Example Configuration
If
MEND_OVERRIDE_SETTINGS_INHERITANCEis set to "mend-config/mend-config":All
settingsInheritedFromvalues will be ignored, and the global config will be "mend-config/mend-config".For instance, "whitesource-config/whitesource-config@master" will point to "mend-config/mend-config@master".
For instance, "whitesource-config/whitesource-config@dev" will point to "mend-config/mend-config@dev".