Storing regular expressions in variables do not work in 13.5
https://docs.gitlab.com/12.10/ee/ci/variables/#storing-regular-expressions-in-variables
The page contains an example:
variables:
MYSTRING: 'master'
MYREGEX: '/^mast.*/'
testdirect:
script: /bin/true
rules:
- if: '$MYSTRING =~ /^mast.*/'
testvariable:
script: /bin/true
rules:
- if: '$MYSTRING =~ $MYREGEX'
I ran this example in my 13.5.1-ee (a4cc9d13) (with addition of according runners tag) and example just do not work, i.e. testdirect job is created, but testvariable job - does not.
This page is for 12.10 version, when I tried to switch it to more early versions I got 404.
Originally I met this bug on runner:
gitlab-runner --version
Version: 13.1.0
Git revision: 6214287e
Git branch: 13-1-stable
GO version: go1.13.8
Built: 2020-06-19T21:12:22+0000
OS/Arch: linux/amd64
The same behaviour is for the newest runner:
gitlab-runner --version
Version: 13.5.0
Git revision: ece86343
Git branch: 13-5-stable
GO version: go1.13.8
Built: 2020-10-20T12:05:22+0000
OS/Arch: linux/amd64
Edited by Aleksey Chemakin