20868 - Includes External Files in Gitlab CI YML
What does this MR do?
Enables include
keyword on gitlab-ci.yml
, allowing the inclusion of external files resulting in a composed file that is evaluated as a single one
The external files can be:
- local to the same repository, referenced using the path
- remote in a different location, accessed using HTTP(S) protocol, referenced using the full URL
The include
keyword supports a single local/remote value or an array of multiple local/remote values:
Examples:
include: '/templates/.gitlab-ci-templates.yml'
include: 'https://gitlab.com/gitlab-org/gitlab-ce/blob/8efdf75b/.gitlab-ci-templates.yml'
include:
- '/templates/.gitlab-ci-templates-1.yml'
- '/templates/.gitlab-ci-templates-2.yml'
- 'https://gitlab.com/gitlab-org/gitlab-ce/blob/8efdf75b/.gitlab-ci-templates.yml'
Are there points in the code the reviewer needs to double check?
- Double check if the current implementation covers all the possible scenarios
Why was this MR needed?
To make gitlab-ci.yml
structure restful
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #20868
Edited by Mayra Cabrera