Skip to content

Configurable CI Catalog Component Root Variable to Replace use of $CI_SERVER_FQDN

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

GitLab CI/CD Component Catalog now supports a configurable variable for the component root. All GitLab.com components now use CI_CATALOG_ROOT. On GitLab.com this defaults to be the value of $CI_SERVER_FQDN to maximize compatibility. Self-managed instances can override this variable at the Instance level to reroot all components in a subgroup by setting it to something like 'https://examplegitlab.com/mirroredcomponents/'

Problem to solve

Due to:

  1. the fact that the $CI_SERVER_FQDN is hard coded into GitLab.com hosted components
  2. the fact that overriding this variable on self-managed would have unintended consequences

Organizations mirroring components onto their GitLab instance have to mirror them to the exact top level namespace groups that are used in the original components on .com. Due to community components being in various namespaces, this can result in the need to have many new namespaces on self-managed.

This is undesirable on many self-managed instances where the top level groups are managed and minimized to make administration easier (like settings that propagate to group hierarchies).

Proposal

  1. Create a net new variable for the purpose of serving as the component root on a self-managed instance
  2. Default it to the same value as $CI_SERVER_FQDN (for .com and anyone who can actually mirror all component paths)
  3. Change the outputted code snippet for all components to use the new variable.
  4. It would be a critical attribute that this variable can contain more of the group path than just the FQDN
  5. It would be a critical attribute that this variable is designed to allow override at the instance level (it's initial value is set before instance variables are then processed)

Intended users

Feature Usage Metrics

Here is at least one issue where users who want to mirror are experiencing difficulties: guided-explorations/ci-components/kaniko#1

Does this feature require an audit event?

No

Edited by 🤖 GitLab Bot 🤖