[BUG] - Except with variables are not working

ci

#1

Hi, I have encoutered a problem with Gitlab Pipeline.

I have a code, which updates some files in the pipeline and then it commit to the same branch (develop).

But, I don’t want to create not-ending loop of pipelines, so I have a variable there (in except scope), which should stop it. But that looks like, that in the except scope it is not working.

If I move it to the only scope, it is working like a charm. I think, that it is Gitlab bug.

Or am I doing something wrong? (It starts from the develop branch, then it pushes and it starts again from commit with commit name CI_VERSION_UPDATE)

FILE: .gitlab-ci.yml

image: node:latest

before_script:
  - yarn
  - echo $CI_COMMIT_MESSAGE
  - git remote set-url origin "https://gitlab-ci-token:${CI_TAG_UPLOAD_TOKEN}@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git"
  - git config user.email bot@domain.com
  - git config user.name 'CI Bot'

update-develop:
  stage: deploy
  only:
    refs:
    - develop
  except:
    variables:
    - $CI_COMMIT_MESSAGE == "CI_VERSION_UPDATE"
  script:
  - yarn build:update
  - git add .
  - git commit -m "CI_VERSION_UPDATE"
  - git push -u origin HEAD:develop