Single CI Components should not require full include path
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Proposal
Make it so that if the name of the component matches the project-slug, you don't have to add redundant path strings on component include.
If component is in my-group/my-project/templates/<template.yml|my-project.yml>, then including it should be as simple as - component: $CI_SERVER_HOST/my-group/my-project@<version>
Overview
Currently, if I want to independently version a set of components, I have to put them into individual repositories, and release them as individual components. The whole feel of this is weird when I go to include these components though. For the sake of a good context, let's create a hypothetical scenario: I own a new javascript framework (because it's a day that ends in y), and I'm creating components for my frameworks users to build and test their software using the frameworks internal tooling. I initially created a single repo, with both components. However, i started running into problems with users spending time and getting frustrated when they upgraded the js-framework/test component from @1.0.0 to @3.0.0 when the code of the js-framework/test component didn't change at all. They expected the incrementing of a major version meant a breaking change, but in reality the breaking change was to js-framework/build.
By putting these two components in their own projects, I can version them independently, and my users are happy once again... except now the path names are awkward:
include:
- component: $CI_SERVER_HOST/js-framework/build/template@3.0.0
they now have to add a template to the end of the path, which seems pretty redundant when the build component is the only component in the js-framework/build project.
Now for the non-hypothetical part. Prior to Gitlab 16.11, if you had a file template.yml in the directory templates, this awkwardness didn't exist. You could do $CI_SERVER_HOST/js-framework/build@<version>.
Basically, the current directory and versioning conventions of components is creating a user experience that I feel is sub-optimal. You either have to version numbers of components together in order to get include paths that make sense when read out loud, or you have to have weird or duplicate strings in the path segments of a component include in order to independently version them.
I really don't like having to tell people to include component: $CI_SERVER_HOST/js-framework/build/build@<version>