gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

PCRE RegEx broken

Open djettah opened this issue 11 months ago • 4 comments

Minimal .gitlab-ci.yml illustrating the issue

build-fake:
  stage: build
  variables:
    REGEX: '/^(\d+(\.\d+)*|latest)$/'
  script:
    - echo fake build
  rules:
    - if: $CI_COMMIT_TAG =~ $REGEX

Expected behavior It should match a job but it doesn't:

# gitlab-ci-local --list --variable CI_COMMIT_TAG=1.11  
parsing and downloads finished in 56 ms
name        description  stage   when   allow_failure  needs

# gitlab-ci-local --list --variable CI_COMMIT_TAG=latest
parsing and downloads finished in 80 ms
name        description  stage   when        allow_failure  needs
build-fake               build   on_success  false      

Doesn't it support PCRE? GitLab does.

Host information Ubuntu gitlab-ci-local 4.41.2

Additional context Add any other context about the problem here.

djettah avatar Jul 12 '23 17:07 djettah