Flatten CI config rules
What does this MR do?
Changes rules
to flatten its elements. This makes it possible to nest arrays of rules in the rules
CI config section anywhere. This is useful when using !reference
to compose rules
out of several arrays of rules.
This means that
.no_schedule:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: on_success
job1:
image: alpine:latest
rules:
- !reference [.no_schedule, rules]
script:
- echo "run except schedules and tags"
used to be invalid CI config but is now valid.
Related #322992 (closed)
How to setup and validate locally (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) - see: #338600 (closed)
-
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Edited by Alex Kalderimis