How to setup component path in gitlab-ci?

I tried to set up and use a component in my gitlab-ci pipeline. But stuck on the following error:

Setup:

project-group/components/templates/build_image.yml
project-group/components/README.md

Usage in another project: .gitlab-ci.yml:

include:
  - component: $CI_SERVER_FQDN/all/project-group/components/build_image

Result:

Unable to create pipeline
Component 'my.fqnd.com/all/project-group/components/build_image' - the component path is not supported

What might be wrong here? According to CI/CD components | GitLab Docs I should have fulfilled all mandatory requirements.

Problem

You’re trying to use a CI/CD component in GitLab with this include syntax:

include:
  - component: $CI_SERVER_FQDN/all/project-group/components/build_image

But you get this error:

“Component path is not supported”


Cause

The error usually means one of these common issues:

  1. Incorrect component path format
    GitLab expects this format:
component: <hostname>/<group>/<project>/<path-to-yml-file>

Must include the .yml file name at the end (e.g. build_image.yml).
2. Missing .gitlab-ci-component.yml file**
The component project must have a file named .gitlab-ci-component.yml in its root.
3. Component feature is not available
Components require GitLab Premium or higher and must be enabled. Check your GitLab version and plan.


Fix

Update your include to explicitly point to the file:

include:
  - component: $CI_SERVER_FQDN/project-group/components/templates/build_image.yml

Also, ensure that:

  • The project project-group/components has a .gitlab-ci-component.yml file.
  • The included file (build_image.yml) exists at the correct path.
  • You are using GitLab Premium or higher (or self-managed with components enabled).

Summary

You saw “Component path is not supported” because the component path:

  • Did not include the .yml file, or
  • The component project is missing required setup, or
  • You’re using a GitLab tier that doesn’t support components.

Fix the path and check prerequisites, and it should work.

Let me know if you’d like help generating the .gitlab-ci-component.yml or verifying your setup.