Add a CI_PROJECT_ROOT_NAMESPACE_ID pre-defined CI/CD variable

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

  • Close this issue

Problem to solve

At least one GitLab API resource only accepts group IDs as input (not group path, only group ID). Particularly, I'm referring to the Users API for creating a group runner, but there might be more like this.

I'm automating self-hosted group runner creation in CI/CD, for which I need the group ID of the root namespace of the project where the automation runs. Right now, I only have the path, via the CI_PROJECT_ROOT_NAMESPACE variable, but I need the ID. As a workaround, I've simply added the ID as a CI/CD variable in the root namespace, but it'd be neat if it were pre-defined.

Proposal

My proposal is pretty simple, I'd say: add a CI_PROJECT_ROOT_NAMESPACE_ID variable to the list of pre-defined CI/CD variables, with the ID of the root namespace.

Intended users

I'd say:

  • Priyanka (Platform Engineer)
  • Ingrid (Infrastructure Operator)
  • Isaac (Infrastructure Engineer)

(This is my first feature proposal here and my first time seeing this, so apologies if I did it wrong.)

Feature Usage Metrics

I don't know, but I can infer it'll be the same way you track the usage of the CI_PROJECT_ROOT_NAMESPACE variable, if any.

Does this feature require an audit event?

I don't... think so?

Edited Sep 24, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading