CI rules property does not work for a specific repository


I am using a shared pipeline configuration across some repositories, and for one of the repositories, some steps are never executed because the rules somehow are not working as intended.

To debug it, I wrote a simple pipeline configuration for this repository that should be executed but is not. This same example will be executed if the rules property is commented and it will print flap_test as seen here: build_docker (#1283068377) · Jobs · FLAP / Element · GitLab.

How could I debug it further ? Is there a repository configuration that could cause this ?

        - if: '"$CI_COMMIT_BRANCH" == "flap_test"'
        - echo HELLO
        - echo $CI_COMMIT_BRANCH

Thanks for your help.

Fixed, the syntax was wrong, there is no need to have quotes around the variable reference.

This works:

        - if: '$CI_COMMIT_BRANCH == "flap_test"'
1 Like