gitlab-ci-local
gitlab-ci-local copied to clipboard
PCRE RegEx broken
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.