Closed vivek9ru3 closed 3 weeks ago
Minimal .gitlab-ci.yml illustrating the issue
--- variables: VAR1: val1 VAR2: val2 Test: script: - echo "hello" rules: - if: $VAR1 == 'val1' - if: $VAR2 == 'val2' when: never
Running gitlab-ci-local --list with the above gitlab ci configuration produces incorrect results (it doesn't list the Test job)
gitlab-ci-local --list
parsing and downloads finished in 63 ms json schema validated in 95 ms name description stage when allow_failure needs
Expected behavior gitlab-ci-local --list should list the "Test" job as the first rule evaluates to true.
Host information Mac 14.4.1 gitlab-ci-local 4.50.0 and above
Additional context This started happening with version 4.50.0. Possibly due to https://github.com/firecow/gitlab-ci-local/commit/ef8097bedca05230bef15a3f52d395a6414eef23 as it doesn't stop evaluating rules unless when = never
But Gitlab docs for rules says
Rules are evaluated when the pipeline is created, and evaluated in order until the first match
A small change to fix this issue https://github.com/firecow/gitlab-ci-local/pull/1253
Minimal .gitlab-ci.yml illustrating the issue
Running
gitlab-ci-local --list
with the above gitlab ci configuration produces incorrect results (it doesn't list the Test job)Expected behavior
gitlab-ci-local --list
should list the "Test" job as the first rule evaluates to true.Host information Mac 14.4.1 gitlab-ci-local 4.50.0 and above
Additional context This started happening with version 4.50.0. Possibly due to https://github.com/firecow/gitlab-ci-local/commit/ef8097bedca05230bef15a3f52d395a6414eef23 as it doesn't stop evaluating rules unless when = never
But Gitlab docs for rules says