Add tests and documentation about how CI "extends" can be excluded

What does this MR do and why?

Related to #36372 (closed)

This MR adds tests and documentation about how CI "extends" can be excluded.

The "extends" keyword works via reverse a reverse deep merge. So, when you want to exclude a key from it, adding "{}" won't work. You need to assign it to "null".

Screenshots or screen recordings

There is a more detailed example in a new test case but here is another one;

Example 1

.base:
  variables:
    VAR1: hello
  script: exit 0

job:
  extends: .base
  variables:
    VAR2: mello

The result is;

job:
  variables:
    VAR1: hello
    VAR2: mello
  script: exit 0

Example 2

.base:
  variables:
    VAR1: hello
  script: exit 0

job:
  extends: .base
  variables: {}

The result is;

job:
  variables:
    VAR1: hello
  script: exit 0

Example 3

.base:
  variables:
    VAR1: hello
  script: exit 0

job:
  extends: .base
  variables: null

The result would be;

job:
  script: exit 0

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports

Loading