The source project of this merge request has been removed.
WIP: Do deep merges of external (include) files with .gitlab_ci.yml
What does this MR do?
Changes the behaviour of the include
keyword on .gitlab-ci.yml
to combine external CI files and .gitlab-ci.yml
using deep_merge.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
GitLab EE 10.5 introduced include
in GitLab CI files, which allows for CI configurations to be defined outside of a repository's .gitlab-ci.yml
and merged in. However, there is no way to customize included jobs (for example) without duplicating the entire job.
@ayufan suggested that CI files be merged using deep merge. This recursively merges hashes, instead of completely replacing hash key-values at the root level.
Note that deep merging of hashes does not merge arrays/lists.
Screenshots (if relevant)
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 #5078 (closed)
Edited by Mayra Cabrera