fix(model): handle YAML map forms that caused unmarshall errors
Variables with value/description/options sub-keys, default.image in map
form, default.before_script / default.after_script as block scalars, and
rules.changes / rules.exists in {paths, compare_to} map form all caused
"yaml: cannot unmarshal !!map into string" because the struct fields were
typed too narrowly.
Changed types in model.Pipeline, model.DefaultConfig, and model.Rule to
accept any to match GitLab CI spec flexibility (13.7+ variable declarations,
15.3+ rules.changes map form, image map form in default block).
Adds testdata/script_multiline.yml covering all these patterns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,8 @@ tasks:
|
||||
ignore_error: false
|
||||
- cmd: ./{{.BINARY}} check testdata/includes_component.yml
|
||||
ignore_error: false
|
||||
- cmd: ./{{.BINARY}} check testdata/script_multiline.yml
|
||||
ignore_error: false
|
||||
- cmd: ./{{.BINARY}} check testdata/context_rules.yml
|
||||
ignore_error: false
|
||||
- cmd: ./{{.BINARY}} check --branch main testdata/context_rules.yml
|
||||
|
||||
Reference in New Issue
Block a user