-
- Downloads
You need to sign in or sign up before continuing.
Refactor metadata usage in CI Rules entry
Entry::Rules is shared between the Workflow and Processable entries. Normally, we support only the if, changes, exists, when, and variables keys in workflow:rules. Yet, we accidentally allow start_in, allow_failure, and needs. In this change, we don't aim to fix this, this will be done in #436473. In this change, we aim to simplify and highlight this behavior by adding allowed_keys in the Rules usage. Also, in validations, we start using only allowed_when and allowed_keys, we don't use the class constants anymore.
Showing
- .rubocop_todo/rspec/feature_category.yml 0 additions, 2 deletions.rubocop_todo/rspec/feature_category.yml
- lib/gitlab/ci/config/entry/processable.rb 2 additions, 1 deletionlib/gitlab/ci/config/entry/processable.rb
- lib/gitlab/ci/config/entry/rules/rule.rb 13 additions, 5 deletionslib/gitlab/ci/config/entry/rules/rule.rb
- lib/gitlab/ci/config/entry/workflow.rb 6 additions, 1 deletionlib/gitlab/ci/config/entry/workflow.rb
- spec/lib/gitlab/ci/config/entry/rules/rule_spec.rb 7 additions, 31 deletionsspec/lib/gitlab/ci/config/entry/rules/rule_spec.rb
- spec/lib/gitlab/ci/config/entry/rules_spec.rb 4 additions, 2 deletionsspec/lib/gitlab/ci/config/entry/rules_spec.rb
- spec/lib/gitlab/ci/config/entry/workflow_spec.rb 29 additions, 3 deletionsspec/lib/gitlab/ci/config/entry/workflow_spec.rb
Please register or sign in to comment