Skip to content

Backend: Implement support for "null" value to remove parent node

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

From discussions in gitlab-org/ci-cd/pipeline-authoring#127 (closed), steps were identified to build the next feature set for CI inputs.

Proposal

Use null as an input value to remove parent node (the keyword). This can work with any type, but will only work if null is the only value of the keyword after interpolation

Examples

This will remove the parent node needs:

# included.yml

spec:
  inputs:
    needs:
      type: array
      default: null

---

test:
  script: ls
  needs: $[[ inputs.needs ]]
# .gitlab-ci.yml

include:
  - local: included.yml

Results in:

test: # needs keyword is removed
  script: ls
Edited by 🤖 GitLab Bot 🤖