Hey
i’m trying to create a Job in my CI Pipeline that only runs when certain variable match a pattern flavored with the job name. Runner is a windows machine with powershell as executer.
So i have this yaml anchor and
.build: &build
only:
variables:
- $CI_JOB_NAME =~ /build_$env:PROJECT/
...
and the job look like:
build_projectone:
<<: *build
...
So if i run a manual ci pipeline from the gitlab ui with the environment variable $PROJECT set to “projectone”, it should run the job but it will be skipped instead.
i already tried to give the variables condition a different touch with and with env_, only with _ and so on but nothing helps.
Can anyone tell me whats wrong with the yaml?