Recommended include doesn't work on self-hosted GitLab
The include:file
keyword can only be used within projects on the same instance (GitLab.com):
include:
- project: 'renovate-bot/renovate-runner'
file: '/templates/renovate-dind.gitlab-ci.yml'
Projects on a self-hosted GitLab instance must use include:remote
:
include:
- remote: "https://gitlab.com/renovate-bot/renovate-runner/templates/renovate-dind.gitlab-ci.yml"
However, this leads to a problem on the nested include in this file, since it uses the include:local
shorthand:
include: '/templates/_common.gitlab-ci.yml'
It throws the following error on the pipeline execution:
Local file /templates/_common.gitlab-ci.yml does not have project!
So far I had to duplicate all the templates to my project.
Related issue: gitlab-org/gitlab#35180 (closed)
Edited by Fernando Maia