Gitlab pipeline evaluation order

Hi! I run below gitlab pipeline and always only job1 is executed. I have no idea why? I guess it has something to do with variable evaluation…

GitLab Enterprise Edition 15.0.0-pre a81a1e8bf2e

stages:

  • test

after_script:

  • echo $CI_DEFAULT_BRANCH
  • echo $CI_COMMIT_REF_NAME
  • echo $RELEASE_BRANCH
  • echo $CI_COMMIT_BRANCH

test-job1:
stage: test
rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- echo 1
variables:
RELEASE_BRANCH: $CI_DEFAULT_BRANCH

test-job2:
stage: test
rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == $RELEASE_BRANCH
script:
- echo 2
variables:
RELEASE_BRANCH: $CI_DEFAULT_BRANCH