Parse Expressions & Rules for inputs
Context
Part 2/8: Dynamic Input Selection in GitLab Pipelines pla... (#520094 - closed) - this will parse and evaluate expressions.
Build the core expression evaluation engine that powers dynamic input rules. This engine parses and evaluates conditional expressions from the rules.
# Simple
- if: $[[ inputs.cloud_provider ]] == 'aws'
options: ['t3.micro', 't3.small']
# Complex
- if: $[[ inputs.cloud_provider ]] == 'aws' && $[[ inputs.environment ]] == 'development'
options: ['t3.micro', 't3.small']
default: 't3.micro'
Notes
- Schema will be extendible for additional operators post-MVP -
!=
and||
withouth breaking changes
Error Handling:
- Invalid syntax: clear parse error messages
- Missing inputs: graceful handling with boolean result
- Unsupported operators: helpful error messages
This will be split up into two MRs:
MR 1 - Expression infrastructure & parsing !206891
MR 2 - More input validation and circular deps
Edited by Laura Montemayor