I want my CI job to only run if a file exists. My path contains environment variable that is passed on the GitLab CI/CD schedule variables.
rules:
- exists:
- foo/bla/${ENV}/foo.json
When I use the $ENV
environment variable (with or without curly braces), it does not work (the job is not created). However, when I explicitly state the full path (foo/bla/prod/foo.json), it does work.
My concern is that GitLab does not evaluate the environment variables when they read the rules.
Any help would be appreicated.