fix(cicontext): cascade AND-group variables to later members' if: conditions
Variables set by an earlier AND-group member's variables: block are now injected into the evaluation context before testing later members' if: expressions. This matches GitLab CI behaviour where e.g. element 0 sets DEPLOY=true and element 1 can then check $DEPLOY without requiring the caller to inject that variable manually. Previously evalRuleGroup passed the same base vars closure to every member, so cascaded variables were never visible during if: evaluation (only in the merged output returned after the group fired). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
This project uses [Semantic Versioning](https://semver.org).
|
||||
|
||||
## [0.5.1] - 2026-07-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- **AND-group variable cascading** — variables set by an earlier AND-group member's `variables:` block are now visible when evaluating later members' `if:` conditions. Previously all members were evaluated with the same base context, so a group like `[{if: "$CI_COMMIT_TAG", variables: {DEPLOY: "true"}}, {if: "$DEPLOY"}]` would never fire because `$DEPLOY` was not yet injected when the second element was tested. This matches GitLab CI's actual behaviour.
|
||||
|
||||
## [0.5.0] - 2026-07-30
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user