GitLab global/group variable not available when being used as part of CI/CD component inclusion in a dynamic child pipeline
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
I know the title is very crazy, let me explain this.
I cannot share the original code because it is on-premises and it's confidential, but I did take the effort to reproduce the essence of it on GitLab.com
Reproduction
I am authoring a CI/CD component library (see it here). It is essential to test the component library. For testing, I git clone one of the representative consumer of this component library. I save it as artifact so that I can trigger it as a dynamic child pipeline. For some reason however, if in this yml definition I try to include this very ci/cd component (and try to use some global variables) it doesn't work.
Notice how the value of $CI_SERVER_HOST is missing from the beginning of path:

When however I try a version where the value is hard-coded (feature branch) then it works.
I don't think that the problem is with the dynamic child pipeline feature (because otherwise variables are available) but rather with the combo of of dynamic child pipeline and referring to component library with (global) variable.