Allow variables to be used on rules exists
When writing a pipeline, it may be desired to create a rules:exists rule where instead of listing an exact filename, the filename is stored in a variable (this is especially true when working on templates and includes etc.
However, variables are not evaluated to this purpose.
variables:
TESTFILE: myfile
job:
stage: test
rules:
- exists:
- $TESTFILE
As a workaround, one can check for the mere existence of the variable of course.
A demo repo can be found here: https://gitlab.com/olliver/sandbox/bugs/349345/