-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCRE RegEx broken #932
Comments
According to https://docs.gitlab.com/ee/ci/jobs/job_control.html#compare-a-variable-to-a-regex-pattern the regex syntax is called RE2. |
Great, we need to utilize this package if possible then. |
@firecow I wish I would understood your first comment earlier. After digging into this subject for 3 hours I found out that the image you posted clearly shows that the specific regex mentioned in this issue should work using build-fake:
stage: build
script:
- echo fake build
rules:
- if: $CI_COMMIT_TAG =~ /^(\d+(\.\d+)*|latest)$/ To be clear, yes we should support RE2 to allow things like Line 202 in 0e442a8
since REGEX is a variable it is replaced with |
This also affects
Testing the pattern and test string on regex101.com confirms that it fails using ECMAScript but passes using PCRE2. Is there anything blocking having this project use By the way, for those who read naweiss's earlier comment and find that the link no longer points to anything regex related, here's some current documentation for another GitLab feature (Push Rules) which confirms that GitLab is using RE2:
|
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior
It should match a job but it doesn't:
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.
The text was updated successfully, but these errors were encountered: