gitlab, includes in other include file?

Viewed 137

I'm wondering if it is possible to includes a file into other includes? for example: let's say I have a file A.yml and File B.yml and gitlab-ci.yml, I want to include B in A then A in gitlab-ci.yml like this :

#in file A.yml
include:
  - 'B.yml'
#in Gitlab-ci.yml
include:
  - 'A.yml'
2 Answers

The short answer - yes, you can, by using the include keyword. E.g.:

include:
    file: '.my-external-file.yml'
Related