3

I tried to check if the content of one variable is part of another variable with:

  rules:
    - if: $DATABASES_LIST !~ /^.*$CI_COMMIT_REF_NAME.*$/
      when: always

but this does not work. I guess this is due to gitlab not expanding the rightmost variable, but I am not sure (and I do not know what can be done about this).

Can somebody tell me how to change it?

Or this is too complex for a rule and I need to check it at the beginning of the ´script`?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142

0 Answers0