CI triggers jobs with false variable expression when using the `=~` operator
GitLab CI triggers jobs that have false variable expressions when using the
For instance, we are using the following pattern to match version tags and jobs are triggered even when
$CI_COMMIT_TAG is empty.
only: variables: - $CI_COMMIT_TAG =~ /^v*/`
Steps to reproduce
Define a job with an
only: variables clause using the
=~ operator will always pass on an empty variable.
What is the current bug behavior?
The job is triggered.
What is the expected correct behavior?
The job should not be triggered.
Output of checks
This bug happens on GitLab.com
This seems to be a regression, because we have been relying on this behavior for several months, I believe it could have been introduced in the last two weeks, so that would fit the 22nd of August — GitLab v12.2