Skip to main content

Give a component its GitLab owner

Each component names its owner in its catalog-info.yaml. With your GitLab groups imported, it can be a real GitLab group.

You need the import of your GitLab groups first.

✏️ Write the owner​

In the component's catalog-info.yaml, in GitLab, write the group in spec.owner, with the group:gitlab/ prefix:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: payment-api
spec:
type: service
lifecycle: production
owner: group:gitlab/paiement-api

At the next collection, the component page shows the group under OWNER, in About.

Build the group name​

One separator per level of the GitLab path. Which one depends on the Group field of the provider.

Group fieldGitLab groupWrite
acmeacme/paiement/apigroup:gitlab/paiement-api
acmeacme/paiement/api/v2group:gitlab/paiement-api-v2
Emptyacme/paiement/apigroup:gitlab/acme.paiement.api
Emptyacme/paiement/api/v2group:gitlab/acme.paiement.api.v2

With a group set, the name starts below it, with a - per level. With Group empty, it is the full path, with a . per level.

With Group empty, a path that holds a « . » is left out

A . must only ever stand for a /. Otherwise two different groups could share a name, and one would take the components of the other.

🔎 Find the exact name​

In doubt? Copy it from the catalog.

  1. Open Catalog, then the Groups tab.

  2. Click the group. The list shows its GitLab name (api), not the name to write.

  3. In the group card, copy the line above Entity Ref, for example group:gitlab/paiement-api.

  4. Paste it as is in owner.

The same page shows the Parent Group, the components the group owns (Ownership) and its members.

✅ That's it!

Something does not match? Read the frequently asked questions and the common problems.