Add array types to CI inputs
What does this MR do and why?
Arrays can be used both independently and to add items to an existing array.
Changelog: added
Issue: #407176 (closed)
How to set up and validate locally
-
In a project's root directory, create a file
included.yml
spec: inputs: echo: type: array needs: type: array rules: type: array --- test_job: needs: $[[ inputs.needs ]] rules: $[[ inputs.rules ]] script: echo '$[[ inputs.echo ]]'
-
In the project's
.gitlab-ci.yml
, put:include: - local: included.yml inputs: needs: - build rules: - if: $RUN_MANUAL when: manual echo: - test - array build: script: ls
-
Check that the full configuration is:
build: script: ls test_job: needs: - build rules: - if: $RUN_MANUAL when: manual script: echo '["test", "array"]'
Edited by Avielle Wolfe