Allow triangular gitlab-ci imports
Problem to solve
# base.yml
.some-step:
script:
- echo "something"
# file1.yml
include:
local: base.yml
# file2.yml
include:
local: base.yml
Then including both file1.yml and file2.yml like so:
include:
- local: file1.yml
- local: file2.yml
Will throw the following error:
Include `{local: base.yml}` was already included!
This appears to be thrown from this code
This is quite frustrating if you're building a semi-complex pipeline that includes some kind of common utilities, which might be included from multiple other files.
Proposal
Do not throw an error in this case. Am I missing something, or is this redundant? What would be the problem with ignoring a duplicate include like this?
Links / references
Edited by Tom Forbes