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 field | GitLab group | Write |
|---|---|---|
acme | acme/paiement/api | group:gitlab/paiement-api |
acme | acme/paiement/api/v2 | group:gitlab/paiement-api-v2 |
| Empty | acme/paiement/api | group:gitlab/acme.paiement.api |
| Empty | acme/paiement/api/v2 | group: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.
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.
-
Open Catalog, then the Groups tab.
-
Click the group. The list shows its GitLab name (
api), not the name to write. -
In the group card, copy the line above Entity Ref, for example
group:gitlab/paiement-api. -
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.