I have what amounts to several different scripts that I want to run in a variety of stages across multiple projects. Currently they are of the form:
.hidden_key: &hidden_key |
do_something
do_something_else
real_job:
script:
- *hidden_key
Effectively .hidden_key
is a function I use throughout the .gitlab-ci.yml
file and across several projects this way. But I can't seem to get the include to work when I move .hidden_key
into a file and include it like this:
include:
- remote: https://gitlab/project/master/raw/hidden_key.yml
real_job:
script:
- *hidden_key
When I do that, gitlab complains about:
Error: Unknown alias: hidden_key
Am I doing something incorrectly, or is this an actual limitation of includes (and therefore not supported) ?
What alternatives to this are there to clean up my .gitlab-ci.yml
file ?